解决 Starting MySQL ERROR The server quit without updating PID file
服务器断电重启后mysql启动报错,记录一下解决方案
环境
mysql版本 5.7.21
服务器 Red Hat Enterprise Linux Server release 7.6 (Maipo)
# myslq启动报错
Starting MySQL.. ERROR! The server quit without updating PID file.
- 首先查看错误日志,注意到在redo log里找不到checkpoint点,innodb引擎启动失败
# 查看/etc/my.cnf下datadir配置的目录
cd /usr/local/mysql/data
# 目录下有一个主机名.err文件
view hostname.err
2022-01-12T05:56:36.174273Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 261550117271 and the end 261550116864.
2022-01-12T05:56:36.174285Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2022-01-12T05:56:36.787768Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-01-12T05:56:36.787839Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-01-12T05:56:36.787854Z 0 [ERROR] Failed to initialize builtin plugins.
2022-01-12T05:56:36.787878Z 0 [ERROR] Aborting2022-01-12T05:56:36.787905Z 0 [Note] Binlog end
2022-01-12T05:56:36.788857Z 0 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
- 按照网上说的,把所有ib_logfile*文件删除,再启动mysql,能够顺利启动,由于是测试环境,所以能跑起来就行了,数据丢了也无所谓,如果是生产环境还需谨慎操作。
# 在/usr/local/mysql/data目录下有两个ib_logfile文件ib_logfile0和ib_logfile1
rm -rf ./ib_logfile*
# 重新启动mysql
service mysqld start
- 推荐的做法是在my.cnf里设置innodb_force_recovery=1 ,如果1不行改成2,最大是6 ,然后启动mysql, 将数据dump出来,再导入到新的实例,这种方法我没试过,仅记录一下。
vi /etc/my.cnf
#将下面参数设置为1
innodb_force_recovery=1
#保存后重启mysql
service mysqld start
- 根据主键id ,逐个区间去导出,用mysqldump -w where条件,再导入到新实例,
- innodb_force_recovery影响整个innodb存储引擎的恢复状况,该值默认为0,表示当需要恢复时,需要执行所有的恢复操作,当不能进行有效恢复时,如数据页发生了corruption,mysql数据库可能宕机,并把错误写入错误日志中。
- innodb_force_recovery=6表示mysql数据库已经有比较严重的损坏,就算把数据dump出来也不能保证dump出来的数据是没有问题的
解决 Starting MySQL ERROR The server quit without updating PID file相关推荐
- 已解决Starting MySQL... ERROR The server quit without updating PID file
Linux服务器重启后启动MySQL报错,错误信息如下: Starting MySQL... ERROR! The server quit without updating PID file (/us ...
- MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法
1 问题 [root@localhost mysql]# /etc/rc.d/init.d/mysql status MySQL is not running, but lock file (/var ...
- Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/vm10-0-0-19
输入:service mysqld start 报错: Starting MySQL.. ERROR! The server quit without updating PID file (/usr/ ...
- linux下mysql启动 Starting MySQL. ERROR! The server quit without updating PID file(xxx/x.pid)
linux下mysql启动 Starting MySQL. ERROR! The server quit without updating PID file(xxx/x.pid) service my ...
- mysql启动之 Starting MySQL.. ERROR The server quit without updating PID file xs43254219216.pid
亲测可用,若有疑问请私信 Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/dat ...
- Starting MySQL... ERROR! The server quit without updating PID file 问题解决
Starting MySQL... ERROR! The server quit without updating PID file 问题解决 参考文章: (1)Starting MySQL... E ...
- Mysql 启动报错解析:Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/dat
现象: root@centos74 ~]# service mysqld start Starting MySQL.. ERROR! The server quit without updating ...
- mysql服务启动失败 Starting MySQL. ERROR! The server quit without updating PID file
[问题描述] 使用 service mysqld start 启动mysql服务失败,提示 Starting MySQL. ERROR! The server quit without updatin ...
- 【庖丁解牛】Starting MySQL.. ERROR! The server quit without updating PID file (/tmp/mysqld.pid)
问题复现 编译安装mysql结束后,初始化mysql,使用的命令: /var/lib/mysql/bin/mysqld --initialize-insecure --user=mysql --bas ...
最新文章
- 我用Redis实现了一个轻量级的搜索引擎!
- git 远程仓库版本的回退以及git reset 几种常用方式记录
- BM算法的shift1表是在所有情况下移动都是最快的吗?
- 求最大整数及其最小下标
- [2020.10.25NOIP模拟赛]序列【Splay】
- 日语学习-多邻国-关卡1-时间2
- dataframe填充到指定的行数
- 大数据之-Hadoop之HDFS的API操作_定位读取文件_只读取某个block的内容_案例---大数据之hadoop工作笔记0065
- 如何解决ado.net entity framework的使用,再别的调用项目中依然正常
- js获取url,截取url参数,截取url后文件名
- 【pyqt5学习】——日历控件calendarWidget设置单元格格式(前景、背景)、日历控件属性编辑
- 摆脱某某助手,使用无线投屏功能共享安卓屏幕到PC
- 本科毕业论文外文文献翻译怎么找?
- jQuery 事件冒泡
- 选中文本弹出对话框效果(如百度文库)
- Sprite Creator Sprite Mask
- 基于大数据技术之电视收视率企业项目实战(hadoop+Spark)
- 实现简易版vue2(数据劫持,观察者,发布订阅)
- 计算机各领域的伟人,了解一下
- 【AI】封杀这个公式,AI智商将为零【转】
热门文章
- HikariPool-1 - Exception during pool initialization.的解决方法
- 学人工智能数学要好吗?
- 不会英语自学php要多久,一个人自学英语要多久 自学英语的方法
- intellij idea 缓存清理,c盘 系统盘清理
- 新人学程序第一弹——Java程序实现九九乘法表
- Java-九九加法表
- Android:详细解析RSSI概念
- 吴明计算机二级二级试题,全国计算机二级ffice-word-历年真题.docx
- 用pecl命令安装php扩展geoip
- [dataframe]python数据集中数据统计分析