Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 126054 - MySQL Client does not read from /etc/mysql/my.cnf
Summary: MySQL Client does not read from /etc/mysql/my.cnf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-13 10:27 UTC by Frido Ferdinand
Modified: 2006-04-12 05:08 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frido Ferdinand 2006-03-13 10:27:34 UTC
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:~]#
Comment 1 Francesco R. (RETIRED) gentoo-dev 2006-03-18 03:27:57 UTC
applyed an upstream patch, could you sync and re-emerge 5.0.19 and test ?
Comment 2 Frido Ferdinand 2006-03-18 12:12:44 UTC
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: 
Comment 3 kfm 2006-03-18 13:09:09 UTC
> 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.
Comment 4 Frido Ferdinand 2006-03-19 00:09:36 UTC
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
Comment 5 Frido Ferdinand 2006-03-21 17:51:28 UTC
Please verify
Comment 6 Konstantin Arkhipov (RETIRED) gentoo-dev 2006-03-23 09:20:14 UTC
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)
Comment 7 Jaco Kroon 2006-03-28 08:41:58 UTC
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.
Comment 8 Jaco Kroon 2006-03-28 08:43:28 UTC
Argh, 4.1.18-r60 sorry.
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2006-04-12 00:44:50 UTC
All ebuilds should be fixed, please emerge --sync, test and reopen if you still have problems.
Comment 10 Frido Ferdinand 2006-04-12 05:08:10 UTC
Works on mysql-5.0.19-r1, now i can remove my symlink, thanks jakub