[Bug 391540] [NEW] mysql client at x86_64 cannot find /etc/mysql/my.cnf

Alesso alesso at alesso.ru
Wed Jun 24 12:12:12 BST 2009


Public bug reported:

Let's look the good system:

root at alesso:~# uname -m
i686
root at alesso:~# dpkg -S /usr/bin/mysql
mysql-client-5.0: /usr/bin/mysql
root at alesso:~# dpkg -s mysql-client-5.0
Package: mysql-client-5.0
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 17964
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Architecture: i386
Source: mysql-dfsg-5.0
Version: 5.0.51a-3ubuntu5.4
<..skipped..>

root at alesso:~# /usr/bin/mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root at alesso:~# strace /usr/bin/mysql 2>&1|grep my.cnf
stat64("/etc/mysql/my.cnf", {st_mode=S_IFREG|0644, st_size=3897, ...}) = 0
open("/etc/mysql/my.cnf", O_RDONLY|O_LARGEFILE) = 3
stat64("/root/.my.cnf", 0xbf8d915c)     = -1 ENOENT (No such file or directory)
stat64("/usr/etc/my.cnf", 0xbf8d915c)   = -1 ENOENT (No such file or directory)


As you can see the client finds /etc/mysql/my.cnf, reads it and attempts to connect to the server via valid socket. The further error (access denied) is expected in this situation, so everything is ok.


Now we will look at buggy systm

root at y72:~# uname -m
x86_64
root at y72:~# dpkg -S /usr/bin/mysql
mysql-client-5.0: /usr/bin/mysql
root at y72:~# dpkg -s mysql-client-5.0
Package: mysql-client-5.0
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 19628
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Architecture: amd64
Source: mysql-dfsg-5.0
Version: 5.0.51a-3ubuntu5.4
<..skipped..>

root at y72:~# /usr/bin/mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
root at y72:~# strace /usr/bin/mysql 2>&1|grep my.cnf
stat("/etc/my.cnf", 0x7fff33e71cc0)     = -1 ENOENT (No such file or directory)
stat("/usr/local/mysql/etc/my.cnf", 0x7fff33e71cc0) = -1 ENOENT (No such file or directory)
stat("/root/.my.cnf", 0x7fff33e71cc0)   = -1 ENOENT (No such file or directory)

The only difference is that the archicecture is amd64 now.
But client tries to find /etc/my.cnf instead of /etc/mysql/my.cnf and cannot find it.

Yeah, I can make a symlink but the situation is inaccurate and looks
like compile bug.

The problem looks to be exist for two years at leasts since there are
such theme at http://ubuntuforums.org/archive/index.php/t-312460.html .

** Affects: mysql-dfsg-5.0 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
mysql client at x86_64 cannot find /etc/mysql/my.cnf
https://bugs.launchpad.net/bugs/391540
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-dfsg-5.0 in ubuntu.



More information about the Ubuntu-server-bugs mailing list