MySQL Forums
Forum List  »  Newbie

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Posted by: Peter Lauren
Date: July 12, 2012 07:34PM

OK. There are a myriad of posts about this but there does not appear to be any one solution that works. I have tried other people's solutions but they do not work.

I have LAMP installed on Ubuntu 11.10. I type

$ mysql

and get

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I tried

$ sudo service mysql stop

and got

mysql stop/waiting

then

$ sudo rm /var/run/mysqld/mysqld.sock

then

$ sudo service mysql start

and got

mysql start/running

However, when I typed

$ mysql

I got

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Any assiatance with this would be greatly appreciated. Also are there any plans to fix this problem with mysql?

Many thanks in advance,
Peter

Options: ReplyQuote




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.