If user enables in /etc/mysql/my.cnf [mysqld] # this can make it even more secure: skip-networking then ordinary users cannot connect to mysqld although they have in ~/.my.cnf [client] port=3306 #host=127.0.0.1 socket=/var/run/mysqld/mysqld.sock The problem is that the /var/run/mysqld/ has no 'x' bit for everybody. It should be either changed or noted in the my.cnf. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Well, no... :-) <snip> if ! useq minimal; then #empty dirs... [ -d "${ROOT}/${DATADIR}" ] || install -d -m0750 -o mysql -g mysql ${ROOT}/var/lib/mysql [ -d "${ROOT}/var/run/mysqld" ] || install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld </snip> $ ls -la /var/run/mysqld total 5 drwxr-xr-x 2 mysql mysql 136 Aug 4 20:32 . drwxr-xr-x 7 root root 536 Jul 30 03:00 .. -rw-r--r-- 1 mysql mysql 0 Jul 23 15:26 .keep -rw-rw---- 1 mysql mysql 6 Aug 4 20:32 mysqld.pid srwxrwxrwx 1 mysql mysql 0 Aug 4 20:32 mysqld.sock If your permissions ended up otherwise, then it's not ebuils fault.
At least dev-db/mysql-4.0.25-r2 does not reset the permissions to those you reported if the directory already existed. If this is a bug or not depends ion the interpretation. ;)