Hi, Currently using mysql 5.0.19 and the client does not read from /etc/mysql/my.cnf (after password a random password is typed, my.cnf contains different socket) [root@timor:~]# mysql --version mysql Ver 14.12 Distrib 5.0.19, for pc-linux-gnu (i686) using readline 5.0 [root@timor:~]# emerge -vp mysql These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] dev-db/mysql-5.0.19 USE="berkdb big-tables perl ssl -cluster -debug -embedded -extraengine -max-idx-128 -minimal -srvdir -static" 0 kB Total size of downloads: 0 kB [root@timor:~]# mysql -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) [root@timor:~]# ln -s /etc/mysql/my.cnf /etc/my.cnf [root@timor:~]# mysql -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [root@timor:~]#
applyed an upstream patch, could you sync and re-emerge 5.0.19 and test ?
Where exactly is the patch ? I remerged mysql at: Sat Mar 18 20:05:00 GMT 2006 however the problem still exists: snip from: strace mysql -p 2>&1 | grep my stat64("/etc/my.cnf", 0xbff5a2e0) = -1 ENOENT (No such file or directory) stat64("/root/.my.cnf", 0xbff5a2e0) = -1 ENOENT (No such file or directory) Enter password:
> Where exactly is the patch ? The patch "010_all_slot-my-print-default-r3" should be extracted from ${DISTDIR}/mysql-extras-20060115.tar.bz2 and applied during the unpacking stage.
Checking with keepwork in make.conf it seems that the patch is applied. I also checked config.log and it has two instances of sysconfdir, the first in /etc and the second in /etc/mysql
Please verify
still reproducible with latest dev-db/mysql-5.0.19. regression, probably. stat64("/etc/my.cnf", 0xbf991bd0) = -1 ENOENT (No such file or directory) stat64("/home/voxus/.my.cnf", 0xbf991bd0) = -1 ENOENT (No such file or directory)
Same thing applies to 4.0.18-r60. strace reveals the attempted locations: stat("/etc/my.cnf", 0x7ffffffd1a70) = -1 ENOENT (No such file or directory) stat("/var/lib/mysql/my.cnf", 0x7ffffffd1a70) = -1 ENOENT (No such file or directory) stat("/home/jkroon/.my.cnf", 0x7ffffffd1a70) = -1 ENOENT (No such file or directory) Not critical, will use ${HOME}/.my.cnf for the moment but setting a default --host is really handy.
Argh, 4.1.18-r60 sorry.
All ebuilds should be fixed, please emerge --sync, test and reopen if you still have problems.
Works on mysql-5.0.19-r1, now i can remove my symlink, thanks jakub