Bug #23624 Extra quotes in mysqld.sock path
Submitted: 25 Oct 2006 12:53 Modified: 22 Mar 2008 23:31
Reporter: Andrew Kirilenko Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.26 OS:Linux (Gentoo Linux)
Assigned to: Assigned Account CPU Architecture:Any

[25 Oct 2006 12:53] Andrew Kirilenko
Description:
After upgrading to mysql 5.0.26 nor my perl nor ruby progs are not able to connect to DB with messages like:

Can't connect to local MySQL server through socket ''/var/run/mysqld/mysqld.sock'' (2) at /usr/lib/perl5/vendor_perl/5.8.8/Ima/DBI.pm line 312

Please note that there are extra quotes in the socket name. After some investigation I have found this:

iced@iced ~ % strings /usr/lib/libmysqlclient.so | grep mysqld.sock
'/var/run/mysqld/mysqld.sock'

Mysql was configured with:

--with-unix-socket-path=/var/run/mysqld/mysqld.sock

So, most likely, the problem is with autoconf scripts.

How to repeat:
See description.
[26 Oct 2006 12:31] Sveta Smirnova
Thank you for the report.

But I can not repeat it:

$strings lib/mysql/libmysqlclient.so | grep mysql_ssmirnova.sock
/tmp/mysql_ssmirnova.sock

Which shell do you use? Could you please provide exact configure string? Do you use quotes in the configure string?
[26 Oct 2006 12:50] Andrew Kirilenko
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libexecdir=/usr/sbin --sysconfdir=/etc/mysql --localstatedir=/var/lib/mysql --sharedstatedir=/usr/share/mysql --libdir=/usr/lib/mysql --includedir=/usr/include/mysql --with-low-memory --with-client-ldflags=-lstdc++ --enable-thread-safe-client --with-comment=Gentoo Linux mysql-5.0.26-r1 --without-docs --without-big-tables --enable-local-infile --with-extra-charsets=all --with-mysqld-user=mysql --with-server --with-unix-socket-path=/var/run/mysqld/mysqld.sock --without-libwrap --enable-shared --enable-static --without-debug --with-charset=utf8 --with-collation=utf8_general_ci --without-embedded-privilege-control --without-embedded-server --with-bench --enable-assembler --with-extra-tools --with-innodb --without-readline --with-openssl --with-berkeley-db=./bdb --with-geometry --without-ndbcluster --build=i686-pc-linux-gnu
[26 Oct 2006 18:19] Sveta Smirnova
Please also provide output of `echo $SHELL`
[27 Oct 2006 9:37] Andrew Kirilenko
iced@iced ~ % echo $SHELL
/bin/zsh
iced@iced ~ % zsh --version
zsh 4.3.2 (i686-pc-linux-gnu)

The same for root user.
[31 Oct 2006 10:09] Sveta Smirnova
I can not repeat issue using zsh too.

Could you please try using current 5.0.27 version?
[2 Nov 2006 7:05] Albert Chalegua
Same issue here (with mythtv as the client):

$ strings lib/mysql/libmysqlclient.so |grep mysqld.sock
'/var/run/mysqld/mysqld.sock'

You may already know this, but you can connect to 127.0.0.1 instead of localhost as a quick fix (though there may be performance considerations to using ip vs Unix sockets) if that type of change is an option for you.

Check the version of bash you have installed; if it was 3.2 at the time of your last mysql build (and you seem to be running testing based on your zsh version so it's possible), this is probably what messed up the configure process. 3.2 has recently been hard-masked due to various bugs. (http://forums.gentoo.org/viewtopic-t-506847.html)

After downgrading bash from 3.2_p3 to 3.1_p17, I re-emerged mysql:

$ strings lib/mysql/libmysqlclient.so |grep mysqld.sock
/var/run/mysqld/mysqld.sock
Quotes are now gone. This fixed the issue here.
[1 Dec 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[31 Jan 2007 22:26] Sveta Smirnova
Updated status, altough I could not repeat it with indicated version of zsh on different platforms.
[22 Feb 2008 23:31] Sveta Smirnova
Please try with current version 5.0.51a and inform us if problem still exists.
[23 Mar 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".