首页 > 代码库 > Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

这个实在linux下安装mysql的情况,出现了Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)

这个错误,然后service mysql start 一直启动不了。

那么可以用一下的方法

#ps -A|grep mysql 
   显示类似:
  3016 ?        00:00:00 mysqld_safe
   3090 ?        00:00:31 mysqld
  2.#kill -9 3016
  3.#kill -9 3090
  4.#/etc/init.d/mysql restart
  5.#mysql -u root -p


欧克了。

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)