现象:

  登陆时候出现如下信息

  

[root@localhost home]# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

[root@localhost home]#

 

查看mysql状态:

[root@localhost home]# service mysqld status
mysqld dead but subsys locked
[root@localhost home]#

 

解决方法:  修改mysqld的权限

      chown -R mysql.mysql /var/run/mysqld

相关文章:

  • 2021-09-05
  • 2021-07-12
  • 2022-12-23
  • 2021-04-15
  • 2021-06-26
  • 2021-07-09
  • 2021-12-20
  • 2021-08-08
猜你喜欢
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案