[rt-users] RE: Can't connect to local MySQL server through socket

Scott McClelland smcclell at vortexdata.com
Thu May 31 16:46:21 EDT 2001


> 
> when I do mysqladmin version, it is also complaining about can not
> connect to mysql server and can not find /tmp/mysql.sock 
Try 
shell> mysqladmin --socket=/tmp/mysql.sock version
(where /tmp/mysql.sock is the actual location of the mysql.sock file)

> nothing return after do the find / -name mysql.sock
That's probably because the mysqld daemon is not running
> 
> when I bin/safe_mysqld &
> I got "starting mysql daemon database with /usr/local/mysql/data
>   11:50:33 mysql ended"
> 
> in /etc/my.cnf file
> it already has the port and socket path in there.
I would try starting mysqld without the /etc/my.cnf file (rename it
temporarily)

> 
> Is it possible my mysql installation missing the mysql.sock file?
No, the mysql.sock file is created when mysqld starts.

It appears that mysqld is not starting.  Try
shell> ps -ax | grep mysqld
to see if it is running.  

Rename or move the /etc/my.cnf file, then, run:
shell> bin/safe_mysqld &  
and find out where the mysql.sock file is (with find), and modify the my.cnf
file to match the location of the actual mysql.sock file.

There is a very good page on testing mysql connections here:
http://www.mysql.com/doc/C/a/Can_not_connect_to_server.html





More information about the rt-users mailing list