I did an "emerge unmerge mysql" to remove the previous version of mysql I had on my system. I did a hand cleanup of the /var/lib/mysql, etc to make sure I had everything removed. I then did an emerge mysql to get the 4.1.12 version. It indicated success. Whenever I tried to access it, other than via a SU shell, I would get a message about "Can't connect to local MySQL server through socket". I tracked the problem down to wrong access priv's on the /var/run/mysqld/mysqld.sock. Once I corrected the UGO priv's everything worked. Reproducible: Always Steps to Reproduce: 1.emerge mysql 2. 3. Actual Results: Kept getting the message: Can't connect to local MySQL server through socket. Expected Results: Correct the UGO access privs on mysqld.sock to allow rw access (and make sure the intervening subdirectories do as well!).
Well, the socket just goes away once mysql is stopped, so you probably failed to stop it prior to unmerging and this left a stale socket behind. What do you get when you run 'ls -la /var/run/mysqld' ?
Well, I just tried here. Upgrade from 4.0.24 works as expected, no problems here. # ls -la /var/run/mysqld/ total 4 drwxr-xr-x 2 mysql mysql 136 May 31 18:31 . drwxr-xr-x 7 root root 448 May 30 02:27 .. -rw-r--r-- 1 mysql mysql 0 May 31 18:06 .keep -rw-rw---- 1 mysql mysql 6 May 31 18:30 mysqld.pid srwxrwxrwx 1 mysql mysql 0 May 31 18:30 mysqld.sock # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 to server version: 4.1.12-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
chmod a+x /var/run/mysqld and then it works fine.