views:

42

answers:

1

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I have a Rails application and I am getting this error. I have no idea how to find mysql connect it to mysql.sock. I am pretty sure i can go into config/database.yml and set the mysql.sock but where is it or do I need to reinstall it?

When I do locate mysql i get alot of results including the two below

/usr/include/mysql
/usr/bin/mysql

but when I locate mysql.sock I get nothing

+1  A: 

Is mysql actually running, and set to listen on the socket interface. Make sure that the server is started/configured.

well first check to see if it is running

ps auxwww | grep mysql

should do that, if not, then

/etc/init.d/mysql start 

or

service mysql start   

as root (or via sudo, should start it). but if it is running the socket should be in

/var/run/mysqld/mysqld.sock 
Doon
how do i start it
Matt
well first check to see if it is running (ps auxwww | grep mysql) should do that, if not, then /etc/init.d/mysql start as root (or via sudo, should start it). but if it is running the socket should be in /var/run/mysqld/mysqld.sock
Doon