MySQL server PID file could not be found!

linux 服务器安装mysql之后,重启 Mysql 有可能会经常碰到这样的错误提示:

MySQL server PID file could not be found!                  [失败]
[root@localhost local]# MySQL server PID file could not be found!  

反正我是经常碰到这样的情况,有些 reboot 重启下服务器就恢复了。
但是大部分情况可能是进程的问题。

首先输入查询命令:

[root@localhost ~]# ps aux |grep mysq*



root      1763  0.0  0.1 108352  1304 ?        S    01:01   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/localhost.pid
mysql     1905  0.1 39.1 791004 396364 ?       Sl   01:01   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/localhost.err --pid-file=/var/lib/mysql/localhost.pid

如果看到上面的内容,那说明,Mysql 的进程卡死了,这时用就要把这些卡死的进程都关闭。

执行以下命令:

 [root@localhost local]# kill 1763
 [root@localhost local]# kill 1905

然后重启 mysql

[root@localhost local]# service mysql start

Starting MySQL                                             [确定]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值