2

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?

betabandido
  • 16,863
  • 10
  • 53
  • 69
mlzboy
  • 13,296
  • 23
  • 70
  • 94

2 Answers2

1

Restart mysqld.

Ignacio Vazquez-Abrams
  • 699,552
  • 132
  • 1,235
  • 1,283
0

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

mlzboy
  • 13,296
  • 23
  • 70
  • 94