mysql- Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'(
Posted 勾勾net
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql- Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'(相关的知识,希望对你有一定的参考价值。
在终端输入: mysql -u root -p
显示:Can\'t connect to local MySQL server through socket \'/var/run/mysqld/mysqld.sock\'
- 首先命令bai行判断mysql是否正常启动,输入命令ps -ef | grep mysql回车
- service mysqld start
成功了!
ps -ef | grep mysql
运行service mysqld start
再次看:ps -ef | grep mysql
以上是关于mysql- Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'(的主要内容,如果未能解决你的问题,请参考以下文章
Can't connect to MySQL server (10065)
Can't connect to MySQL server on 'localhost'(10061)解决方法
MySQL:Can't connect to mysql server 10038
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2