MySQL server PID file could not be found!

蔚落 2021-11-05 06:46 390阅读 0赞

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

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

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

首先输入查询命令:

  1. [root@localhost ~]# ps aux |grep mysq*
  2. 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
  3. 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 的进程卡死了,这时用就要把这些卡死的进程都关闭。

执行以下命令:

  1. [root@localhost local]# kill 1763
  2. [root@localhost local]# kill 1905

然后重启 mysql

  1. [root@localhost local]# service mysql start
  2. Starting MySQL [确定]

发表评论

表情:
评论列表 (有 0 条评论,390人围观)

还没有评论,来说两句吧...

相关阅读