I have searched the Gentoo forum thouroughly. I tried different approaches discribed in various solutions, which did not work for me.
I also used the following command instead of the mysql_install_db script.

As I said the /var/run/mysqld folder is empty, so there is not much te be touched...

Okay, but if you cannot cd into that directory from / as the mysqld user, then the sock file will not be created. Can you start mpsqld from shell as root and connect okay?? That's one thing to try that the server will start. Next up, can you try and touch a file (any name) into /var/run/mysqld as the mysql user. If it's done and it works, at least we can cross that one off the list. Very often it's these sorts of things that hold the problem!

I'm getting the same errors--no socket errors and no instances of mysqld running in ps -ax. I'm sure our issues are related. No amount of my.cnf files and mysqld_safe --datadir=/var/lib/mysql seem to work.

OK, I installed mySQL-4.0.22-r2 during my installation of slashcode, and everything worked perfectly. Slash was broken though , tried reinstalling slash... complained about DBI. Decided to reinstall mySQL, and have received