| Summary: | Can't connect to local MySQL server through socket ''/var/run/mysqld/mysqld.sock'' (2) | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Greg McIntyre <gentoo> |
| Component: | Current packages | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | CC: | etherealflaim |
| Priority: | High | ||
| Version: | 2006.0 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
Example C program which exposes bug, for me
MySQL configuration file |
||
|
Description
Greg McIntyre
2006-10-25 20:02:56 UTC
Created attachment 100503 [details]
Example C program which exposes bug, for me
Short example largely copied out of mysql's help documents, which connects to the local mysql database using default settings for the unix socket path from libmysqlclient and fails:
gcc -I/usr/include/mysql -g -c -o mysqlplay.o mysqlplay.c
gcc -lmysqlclient -L/usr/lib/mysql -g mysqlplay.o -o mysqlplay
./mysqlplay
Can't connect to local MySQL server through socket ''/var/run/mysqld/mysqld.sock'' (2)
MySQL server has gone away
Created attachment 100504 [details]
MySQL configuration file
In case it helps. I have barely edited it though and have made no changes re. socket paths since installing.
/usr/bin/mysqlbug:CONFIGURE_LINE="./configure '--prefix=/usr' '--host=x86_64-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/lib64/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' '--without-berkeley-db' '--with-geometry' '--without-ndbcluster' '--build=x86_64-pc-linux-gnu' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-march=k8 -O2 -pipe -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing' 'CXXFLAGS=-march=k8 -O2 -pipe -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates'"
Also note that in the line above, the --with-unix-socket-path='''/var/run/mysqld/mysqld.sock'''
but yet, in the mysql eclass,
myconf="${myconf} --with-unix-socket-path=/var/run/mysqld/mysqld.sock"
So, does that leave the problem as something in the ./configure? To me, the difference between the arguments that the eclass generates and what mysqlbug thinks it was configured with is a major part of the problem
|