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: Bubba Jones
Date: January 04, 2006 02:55PM

When I had some issues with my data on a development server, I dumped my data and deleted /var/lib/mysql

I created the directory and standard database files with:
mysql_install_db

Then I chown'd the directory and sub directories to mysql.mysql.

As root, mysql ran fine. As a local user (non-root) I got the Error 2002 and didn't understand why...

I had to add read permissions for other users to /var/lib/mysql so it could check for the socket.
When I ran "mysql_install_db", it gave /var/lib/mysql root permissions only.

Just a heads up.

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)
January 04, 2006 02:55PM
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.