mysql错误之Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
2018-03-08 21:26
831 查看
原因
服务没有开启(安装mysql时没有设置开机自启动)解决
1.手动开启,执行命令(以后每次开机都需要)service mysql start
2.然后在mysql的bin目录登录,输入密码
./mysql -u root -p
其他
服务的关闭service mysql stop
服务的重启
service mysql restart
相关文章推荐
- 解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误
- 解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误
- 记录mysql错误:Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- Mysql连接错误:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (
- 解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误
- 解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误
- mysql连接错误: Can’t connect to local MySQL server through socket /tmp/mysql.sock
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 报错解决方案
- mac ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- Mysql error 2002 (HY000) : Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- 启动SQL提示"Can't connect to local MySQL server through socket '/tmp/mysql.sock"参考解决方案
- mysql error 2002 (HY000) : Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- 原来如此简单:解决Mac上的Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- ERROR 2002 (HY000): 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)
- 记一次 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock’(2) 排错流程