本人经常遇到这个错误,因此从网上找来供大家学习。
[mysql]ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
解决方法
[root@jiangtao ~]#rm -fr /var/lib/mysql/*
[root@jiangtao ~]# rm /var/lock/subsys/mysqld
rm: remove regular empty file `/var/lock/subsys/mysqld'? yes
[root@jiangtao ~]#killall mysqld
[root@jiangtao ~]#service mysqld start
[root@zhao ~]# /etc/rc.d/init.d/mysqld status
mysqld (pid 5457) is running...
经过本人试验之后,省略了大部分的输出代码。希望第大家有帮助。
阅读(1211) | 评论(0) | 转发(0) |