rauhka Posted June 9, 2005 Report Share Posted June 9, 2005 (edited) Afternoon all - when attempting to connect with the MySQL cli i get this error root> #] mysqlERROR 2002: Can't connect to local MySQL server through socket'/var/lib/mysql/mysql.sock' (2) I've had a look at the permissions on this directory and it appears correct (set to o: mysql g: mysql) Any other thought on what could wrong? Edited June 9, 2005 by rauhka Quote Link to comment Share on other sites More sharing options...
aioshin Posted June 9, 2005 Report Share Posted June 9, 2005 check if your Mysql Server already started. or #/etc/init.d/mysqld restart to make sure Quote Link to comment Share on other sites More sharing options...
devries Posted June 9, 2005 Report Share Posted June 9, 2005 Or if you're using MySQL5.0 uninstall it an try MySQL4.1. I had the same problem with 5.0 but installing 4.1 solved it. Quote Link to comment Share on other sites More sharing options...
hallowed Posted June 9, 2005 Report Share Posted June 9, 2005 root> #] mysqlERROR 2002: Can't connect to local MySQL server through socket'/var/lib/mysql/mysql.sock' (2) From the manual There basically two reason why you'd get the error, either the server isn't running, or the mysql.sock (i gather from your post that's your socket name - the default is /tmp/mysqld.sock) doesn't exist anymore. This link should walk you through fixing both issues. :ph34r: good luck Quote Link to comment Share on other sites More sharing options...
rauhka Posted June 9, 2005 Author Report Share Posted June 9, 2005 Thanks guys - the server wasn't running (d'oh!) - up and going now... To complete the topic Checked if mysql server was set to turn on at start up root #] chkconfig --list | grep sql postgresql 0:off 1:off 2:off 3:off 4:off 5:off 6:off mysql 0:off 1:off 2:off 3:off 4:off 5:off 6:off And there it is not set to startup Started services with root #] /etc/init.d/mysql start Tested... and working And of course can't forget to add it too the startup script root #] chkconfig --level 2345 mysql on Is that the right run levels for it? Quote Link to comment Share on other sites More sharing options...
hallowed Posted June 9, 2005 Report Share Posted June 9, 2005 That's everything except runlevel 1, but why you'd want it on level 1 anyways i don't know. Glad if I was any help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.