场景

某个打算用于slave新搭建的实例启动报错,启动过程中报告InnoDB数据页发生损坏。错误日志像下面这样:

150330 15:37:44 mysqld_safe Starting mysqld daemon with databases from /data/mysql/mytest_3306

2015-03-30 15:37:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use –explicit_defaults_for_timestamp server option (see documentation for more details).

2015-03-30 15:37:45 5884 [Warning] Using unique option prefix myisam_recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.

2015-03-30 15:37:45 5884 [Note] Plugin ‘FEDERATED’ is disabled.

2015-03-30 15:37:45 5884 [Note] InnoDB: Using atomics to ref count buffer pool pages

2015-03-30 15:37:45 5884 [Note] InnoDB: The InnoDB memory heap is disabled

2015-03-30 15:37:45 5884 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2015-03-30 15:37:45 5884 [Note] InnoDB: Memory barrier is not used

2015-03-30 15:37:45 5884 [Note] InnoDB: Compressed tables use zlib 1.2.3

2015-03-30 15:37:45 5884 [Note] InnoDB: Using Linux native AIO

2015-03-30 15:37:45 5884 [Note] InnoDB: Using CPU crc32 instructions

2015-03-30 15:37:45 5884 [Note] InnoDB: Initializing buffer pool, size = 2.0G

2015-03-30 15:37:46 5884 [Note] InnoDB: Completed initialization of buffer pool

2015-03-30 15:37:47 5884 [Note] InnoDB: Highest supported file format is Barr.

2015-03-30 15:37:48 5884 [Warning] InnoDB: Resizing redo log from 332768 to 216384 pages, LSN=2740249189

2015-03-30 15:37:48 5884 [Warning] InnoDB: Starting to delete and rewrite log files.

2015-03-30 15:37:48 5884 [Note] InnoDB: Setting log file ./ib_logfile101 size to 256 MB

InnoDB: Progress in MB: 100 200

2015-03-30 15:37:49 5884 [Note] InnoDB: Setting log file ./ib_logfile1 size to 256 MB

InnoDB: Progress in MB: 100 200

2015-03-30 15:37:50 5884 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0

2015-03-30 15:37:50 5884 [Warning] InnoDB: New log files created, LSN=2740249612

2015-03-30 15:37:50 5884 [Note] InnoDB: 128 rollback segment(s) are active.

2015-03-30 15:37:50 5884 [Note] InnoDB: Waiting for purge to start

2015-03-30 15:37:50 5884 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.21-rel69.0 started; log sequence number 2740249189

2015-03-30 15:37:50 5884 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: ab27d3e4-d6af-11e4-8020-c81f66eeffa6.

150330 15:36:33 mysqld_safe Starting mysqld daemon with databases from /data/mysql/mytest_3306

2015-03-30 15:37:50 5884 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: ab27d3e4-d6af-11e4-8020-c81f66eeffa6.

2015-03-30 15:37:50 5884 [Note] RSA private key file not found: /data/mysql/mytest_3306//private_key.pem. Some authentication plugins will not work.

2015-03-30 15:37:50 5884 [Note] RSA public key file not found: /data/mysql/mytest_3306//public_key.pem. Some authentication plugins will not work.

2015-03-30 15:37:50 5884 [Note] Server hostname (bind-address): ’10.x.x.x'; port: 3306

2015-03-30 15:37:50 5884 [Note] – ’10.x.x.x’ resolves to ’10.x.x.x';

2015-03-30 15:37:50 5884 [Note] Server socket created on IP: ’10.x.x.x’.

2015-03-30 15:37:50 7f4ce4d68700 InnoDB: Error: page 32769 log sequence number 2740254202

InnoDB: is in the future! Current system log sequence number 2740249622.

InnoDB: Your database may be corrupt or you may have copied the InnoDB

InnoDB: tablespace but not the InnoDB log files. See

InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html

InnoDB: for more information.

2015-03-30 15:37:50 5884 [Note] Event Scheduler: Loaded 0 events

2015-03-30 15:37:50 5884 [Note] /opt/Percona-Server-5.6.21-rel69.0-675.Linux.x86_64/bin/mysqld: ready for connections.

Version: ‘5.6.21-69.0-log’ socket: ‘/data/mysql/mytest_3306/mysql.sock’ port: 3306 Percona Server (GPL), Release 69.0, Revision 675

2015-03-30 15:37:58 7f4ce4d68700 InnoDB: Error: page 6327 log sequence number 2740254445

InnoDB: is in the future! Current system log sequence number 2740251356.

InnoDB: Your database may be corrupt or you may have copied the InnoDB

InnoDB: tablespace but not the InnoDB log files. See

InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html

InnoDB: for more information.

分析

正常情况下,新部署的实例是不太可能出现InnoDB数据页损坏的。经了解,这个实例是采用xtrabackup工具从master备份过来做恢复的。

细心的同学,通过观察上面的日志,应该能从中发现一些蛛丝马迹。有几个地方需要引起注意:

1、版本是Percona Server 5.6.21;

2、刚启动就把InnoDB的redo log给resize了;

3、刚启动就发现InnoDB的page LSN和redo log中的不匹配;

之所以提醒大家注意上面的三点,并且把版本信息放在了第一条,是因为从5.6版本开始,InnoDB如如果发现当前的redo log文件大小和预设配置的redo log大小不一致的话,就会自动将其删除重建。

写到这里,相信聪明的你应该已经想到什么了吧,没错,导致这个启动报错的原因是:从master上xtrabackup备份出来的innodb redo log大小和本地配置参数不一致,被删除重建,结果事务恢复失败,提示数据也损坏错误信息。

解决

修改slave本地配置文件,把下面几个InnoDB配置选项都修改成和在master上的一样,再次执行恢复启动即可。

innodb_data_file_path

innodb_log_file_size

innodb_log_files_in_group

innodb_file_per_table

mysql启动错误1.69,MySQL无法启动例一相关推荐

  1. windows server 2019 mysql 1053错误:服务没有及时响应启动或控制请求

    windows server 2019 mysql 1053错误:服务没有及时响应启动或控制请求 环境说明:windows server 2019,两台服务器做mysql集群,mysql5.6免安装版 ...

  2. 安装mysql出现错误_安装Mysql时出现错误及解决办法

    因为一时手痒痒更新了一下驱动,结果导致无线网卡出了问题.然而就算是从官网上下载了驱动各种折腾也没有弄好,心里特别堵.无奈只有重装系统这一条路了.这里表示特别难过,因为电脑上东西实在太多了,而且各种环境 ...

  3. navicat for mysql 1045错误,navicat连接mysql时出现1045错误的解决方法

    navicat连接mysql时出现1045错误的解决方法 navicat for MySQL 连接本地数据库出现1045错误 如下图: 查了很多资料,意思是说mysql没有授权远程连接,也就是权限不够 ...

  4. mysql 1032错误_修复mysql slave复制1032错误

    一台从库出现1032错误,那1032是什么错误,我们看一下[root@BLAVDP021 ~]# perror 1032 MySQL error code 1032 (ER_KEY_NOT_FOUND ...

  5. mysql增错误_使用MySQL练习增删改查时因为版本问题出现连接错误

    使用MySQL练习增删改查时出现连接错误,错误提示如下: 2020-02-19 19:53:51.088 ERROR 16328 --- [reate-249798694] com.alibaba.d ...

  6. mysql未指定错误_使用mysql的系统中常见sql错误

    使用mysql的系统中常见的sql错误: 1.事务中某些表是非innodb类型. SQLWarning ignored: SQL state 'HY000', error code '1592', m ...

  7. mysql 1146错误 修复6,MySQL中出现错误1146时出现问题

    因此,我正在使用Python编写一个基本的MySQL教程,我首先使用以下代码创建一个简单的数据库.在import MySQLdb as mdb con = mdb.connect('localhost ...

  8. MySQL常见错误:Starting MySQL...The server quit without updating PID file (/usr/local/mysql/data/localhos

    常见错误1:Starting MySQL-The server quit without updating PID file (/usr/local/mysql/data/localhost.loca ...

  9. Mysql 1146错误 出现Table 'mysql.proc' doesn't exist ( 1146 )

    问题原因:本人将mysql删除重新安装部署以后,打开Navicat出现了Table 'mysql.proc' doesn't exist ( 1146 )错误 本人试了网上多种方法,针对本人这种情况的 ...

最新文章

  1. Java 9 - 17 特性解读:Java 10
  2. websocket探究
  3. POJ 2296 Map Labeler(2-sat)
  4. swiper 上滑触发_四种方式快速实现上滑触底加载效果
  5. 【游山玩水】三清山旅游行程
  6. 经典指针程序互换(一)
  7. linux卡在nfs挂载怎么办,51CTO博客-专业IT技术博客创作平台-技术成就梦想
  8. Linux常用的基本命令10
  9. 【Vue.js 知识量化】基础语法
  10. python zip函数_python内置函数-zip
  11. win10磁盘占用率过高解决办法
  12. 黑盒测试设计专题:正交试验
  13. Android前景与未来趋势
  14. 操作系统:Win10有哪些版本,看完你就知道了
  15. 软件测试 | 期末复习——软件测试综述
  16. macbook蓝牙pan未连接_关于 MacBook 的电池问题,你了解多少
  17. 图片转icon图标并在项目中引用
  18. Echarts动态生成图表,图表类型进行切换,长数据区域展示
  19. python 3d绘图旋转_Python和Matplotlib:在Jupyter Noteb中使3D绘图具有交互性
  20. Python学记(三)turtle库

热门文章

  1. leetcode 396. Rotate Function | 396. 旋转函数(错位相减)
  2. leetcode 530. 二叉搜索树的最小绝对差(Java版)
  3. leetcode 119. 杨辉三角 II
  4. 牛客网_PAT乙级1002_数字分类 (20)
  5. java中Runnable和Callable的区别
  6. python定义匿名函数关键字_python语言的匿名函数、7种可调用对象以及用户定义的可调用类型...
  7. JVM运行时数据区和各个区域的作用
  8. Java文本框只有一行数据,Java只允许输入数目字的文本框
  9. java事件的接收_spring发布和接收定制的事件(spring事件传播)
  10. mybatis mysql查询树形结构_MyBatis collection 集合嵌套查询树形节点