Question

MySQL is broken on my Ubuntu OS. It throws the following error:

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

I wasn't able to repair it. So I want to reinstall MySQL. But I didn't find an effective way. I used sudo apt-get remove mysql-server-5.1,

But after the re-installation, it is still throwing the same error. Any help?

Was it helpful?

Solution 2

I don't know how I change the passwrod,this may occur when i use some rails app, in fact i have set a password for mysql,but when i execute rails rake:db:schema:crate, seems it set the password empty

OTHER TIPS

Restart mysqld.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top