Koozali.org: home of the SME Server

Cannot access MySQL through /tmp/mysql.sock

Ralph Dorr

Cannot access MySQL through /tmp/mysql.sock
« on: January 08, 2001, 07:04:08 AM »
I am having a strange occurance on a e-smith 4.0 server. I have MySQL and PHP installed. I have installed a few scripts that use the MySQL server and all of them get an error "Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111). I can refresh the page a time or two and it loads fine. I can connect to the server just fine from the command line.

The strange thing about it is it's intermittence. Once it is refreshed a few times, the errors go away and it functions perfectly well.

Please advise me what to check next. I am not a Linux expert, but am learning and would appreciate a few pointers for what to troubleshoot next. Could Power Management be interfering? I have it installed on a Clone System with Intel SEA440BX motherboard, Pentium II 333, 128MB Ram, 10GB Hard Drive, 2 DEC Tulip NICs.

Thanks again for your help and a fine product.

Ralph

Charlie Brady

Re: Cannot access MySQL through /tmp/mysql.sock
« Reply #1 on: January 08, 2001, 08:00:23 AM »
Ralph Dorr wrote:
>
> I am having a strange occurance on a e-smith 4.0 server. I
> have MySQL and PHP installed. I have installed a few scripts
> that use the MySQL server and all of them get an error
> "Warning: Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (111).

There's chapter and verse on that message in the MySQL documentation:

http://www.mysql.com/documentation/mysql/commented/manual.php?section=Can_not_connect_to_server

Regards

Charlie

Ralph Dorr

Re: Cannot access MySQL through /tmp/mysql.sock
« Reply #2 on: January 08, 2001, 08:35:24 AM »
I am assuming by this and the symptoms that there is a process that cleans up the /tmp directory? The article says:

The fix in this case is to change the cron job to not remove mysqld.sock' or to place the socket somewhere else. You can specify a different socket location at MySQL configuration time with this command:
shell> ./configure --with-unix-socket-path=/path/to/socket

I cannot access the server right now (Set it to Private) and it's a 45 minute drive to the site.

Question is, how do you recommend fixing it? I'll try it next time I'm onsite.

Thanks,

Ralph