MySQL Forums
Forum List  »  Install & Repo

Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Posted by: mike
Date: March 22, 2007 11:23PM

1) check that the .sock file truly exists
2) if it does, check that the script your user is executing as (non-root, possibly the web user) has permissions to that

you may need to change it to /tmp/mysql.sock or grant world-readable permissions to /var/lib/mysql ...

i found this really weird and was banging my head against it until i realized what was going on.

first try as root, if it works, but doesn't work from apache or another non-root user, it's probably permissions.

please reply to my thread about mysql usage - i'd like to collect some data! thanks!
http://forums.mysql.com/read.php?11,57080

Options: ReplyQuote


Subject
Written By
Posted
January 08, 2009 02:01PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
March 22, 2007 11:23PM
April 15, 2009 11:56AM
October 21, 2009 06:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.