"ERROR 2002 (HY000): /tmp/mysql.sock" How to fix it ? Ubuntu 12.04

May 29, 2015 997 views
MySQL Control Panels Ubuntu

I try change my password, but show this. how to to fix it ?

*root@TS3:~/serverpug# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)*

My system is Ubuntu 12.04

2 Answers

Check that mysql is running with "service mysql status" and if you're not sure jsut do "service mysql start" and then try again.

Show This:

root@TS3:~/serverpug# service mysql status
mysql stop/waiting
root@TS3:~/serverpug# service mysql start
start: Job failed to start

D ;

Have another answer? Share your knowledge.