mysql client at x86_64 cannot find /etc/mysql/my.cnf

Bug #391540 reported by Alesso
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.0 (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Let's look the good system:

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

root@alesso:~# /usr/bin/mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@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@y72:~# uname -m
x86_64
root@y72:~# dpkg -S /usr/bin/mysql
mysql-client-5.0: /usr/bin/mysql
root@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 <email address hidden>
Architecture: amd64
Source: mysql-dfsg-5.0
Version: 5.0.51a-3ubuntu5.4
<..skipped..>

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

Mathias Gug (mathiaz)
Changed in mysql-dfsg-5.0 (Ubuntu):
importance: Undecided → Low
Revision history for this message
Chuck Short (zulcss) wrote :

Still affecting karmic.

Regards
chuck

Changed in mysql-dfsg-5.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Chuck Short (zulcss) wrote :

This should be fixed in natty. Please re-open if you can still reproduce it there.

Thanks
chuck

Changed in mysql-dfsg-5.0 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.