[mythtv-users] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

Greg Donald destiney at gmail.com
Mon Sep 27 07:57:26 EDT 2004


I posted this message to the list about 16 hours ago.  I never saw it
come across on my end, so I am reposting.  Sorry if it appears to be a
duplicate to anyone.

I have installed mythtv from source.  The install went well, no
issues.  Now when I try to run the setup program, I get the error:

> ./setup
Unable to connect to database!
Driver error was [1/2002]:
QMYSQL3: Unable to connect
Database error was:
Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111)

My mysql.sock file is in the default location /tmp as per the MySQL manual:
http://dev.mysql.com/doc/mysql/en/Problems_with_mysql.sock.html

"The default location for the Unix socket file that the server uses
for communication with local clients is `/tmp/mysql.sock'."

How can I tell the setup program to use /tmp instead of the /var/lib/mysql ?

I inserted the mc.sql queries.  MySQL is running and works fine:

> mysql -umythtv mythconverg -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 32 to server version: 4.0.21

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

I am aware I can change the default mysql.sock location via
/etc/my.cnf or ~/.my.cnf or command line, but that is not a viable
option as it breaks my Apache/PHP connection to MySQL among other
things.  There should be a way to inform mythtv's setup program of the
actual mysql.sock location.  I have yet to discover that information.

I have searched the mythtv site, read all the FAQs, Googled for the
error message, and have asked on #mythtv-users.  Surely I am not the
only one who installs MySQL from source allowing it to use it's
default socket location.

Thank you,


-- 
Greg Donald
http://gdconsultants.com/
http://destiney.com/


More information about the mythtv-users mailing list