Public bug reported:

Let's look the good system:

r...@alesso:~# uname -m
i686
r...@alesso:~# dpkg -S /usr/bin/mysql
mysql-client-5.0: /usr/bin/mysql
r...@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-disc...@lists.ubuntu.com>
Architecture: i386
Source: mysql-dfsg-5.0
Version: 5.0.51a-3ubuntu5.4
<..skipped..>

r...@alesso:~# /usr/bin/mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: 
NO)
r...@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

r...@y72:~# uname -m
x86_64
r...@y72:~# dpkg -S /usr/bin/mysql
mysql-client-5.0: /usr/bin/mysql
r...@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-disc...@lists.ubuntu.com>
Architecture: amd64
Source: mysql-dfsg-5.0
Version: 5.0.51a-3ubuntu5.4
<..skipped..>

r...@y72:~# /usr/bin/mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (2)
r...@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.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to