欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

在Linux里运行MySQL时出现错误分析及解决办法

程序员文章站 2023-08-02 20:52:55
在linux里运行mysql时出现下面错误: error 2002 (hy000): can't connect to local mysql server through socket &...

linux里运行mysql时出现下面错误:

error 2002 (hy000): can't connect to local mysql server through socket '/var/lib/mysql/mysql.sock' (2)

解决方法:

重启mysql服务

service mysqld restart

在Linux里运行MySQL时出现错误分析及解决办法

然后登录:

[root@node1 ~]# mysql -uroot -p

enter password:

在Linux里运行MySQL时出现错误分析及解决办法

如果还未解决你的问题请在下面留言:

并写上错误代码哦哦!!!!!