Fork me on GitHub

Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?

安装完 MySQL,启动服务报错。

 

1、启动命令

service mysql start

 

2、报错信息

2019-01-31 17:17:39 1721 [ERROR] Can't start server : Bind on unix socket: Permission denied
2019-01-31 17:17:39 1721 [ERROR] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
2019-01-31 17:17:39 1721 [ERROR] Aborting

 

3、解决方案

mysql.sock 文件所在的目录赋予权限,命令如下:

cd /var/lib/mysql
chown -R mysql:mysql  ./

 

posted @ 2020-07-17 10:58  龙凌云端  阅读(2628)  评论(0编辑  收藏  举报