現象:
登陸時候出現如下信息
[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
