Starting MySQL... ERROR! The server quit without updating PID file /var/run/mysql/localhosts_241.pid

liunx启动mysql服务报

Starting MySQL... ERROR! The server quit without updating PID file (/var/run/mysql/localhosts_241.pid)

1、查看启动状态

systemctl status mysqld

 

查看  目录 /var/run/mysql/ (这里你查看的你一个报错目录位置)是否存在,不存在创建目录,并授权

 

如果不存在就创建该文件夹

#根目录执行
mkdir /var/run/mysql

#在var/run目录下执行
mkdir mysql

.该目录存在后  授权

chown -R mysql:mysql /var/mysql/

之后mysql启动服务OK

 

其它原因:

1、

找到/var/log/mysqd.log
查看包含最后几行包含error的行;
[ERROR] Unix socket lock file is empty /tmp/mysql.sock.lock.
[ERROR] Unable to setup unix socket lock file.
[ERROR] Aborting


解决方法:

删除该文件

rm  -rf /tmp/mysql.sock.lock


 启动:systemctl start mysqld 。即可启动成功。


2、
[ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 41054650 and the end 41056501.
[ERROR] InnoDB: Plugin initialization aborted with error Generic error.
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Failed to initialize plugins.
[ERROR] Aborting

失败原因:因为ib_logfile文件中记录些innodb引擎非常有用的信息比如说默认的innodb默认的配置信息,在未正常关闭server情况下,重启后的server不支持innodb引擎。

解决方法:

 找到mysql的安装目录,比如:cd /usr/local/mysql/data;
 删除ib_logfile文件:

  rm -f ib_logfile*


 启动:systemctl start mysqld

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

醋黄瓜

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值