mysql启动失败:Invalid pid in unix socket lock fileInvalid pid in unix socket lock file /var/lib/mysql/my

mysql启动失败,报错:Invalid pid in unix socket lock fileInvalid pid in unix socket lock file /var/lib/mysql/my

日志文件路径 可以通过查看配置文件

mysql启动失败:Invalid pid in unix socket lock fileInvalid pid in unix socket lock file /var/lib/mysql/my_第1张图片

 

查看日志文件:

vi /var/log/mysqld.log

mysql启动失败:Invalid pid in unix socket lock fileInvalid pid in unix socket lock file /var/lib/mysql/my_第2张图片

进入 /var/lib/mysql 查看mysql.sock.lock,文件大小为0:

mysql启动失败:Invalid pid in unix socket lock fileInvalid pid in unix socket lock file /var/lib/mysql/my_第3张图片

直接删除该文件:

rm  -rf mysql.sock.lock

再启动mysql 即可启动成功

systemctl start mysqld

你可能感兴趣的:(数据库,mysql,数据库,database)