大家好,欢迎来到IT知识分享网。
启动运行于linux环境上的mysql数据库失败,导致业务无法正常进行。对此问题进行排查,手动去启动mysql数据库。启动过程如下:
1.进入mysql数据库所在的linux用户
su – ebaserdb
2.使用tailf查看mysql数据库启动过程中的日志
tailf /home/ebaserdb/log/mysqld1.log
3.使用启动命令来执行mysql数据库的启动
mysql.server start
然后观察数据库日志在启动过程中的数据:
2018-12-04T06:27:41.Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path. 2018-12-04T06:27:41.Z 0 [Note] /home/ebaserdb/bin/xpecd (mysqld 5.7.21) starting as process 34409 ... 2018-12-04T06:27:41.Z 0 [Note] InnoDB: PUNCH HOLE support not available 2018-12-04T06:27:41.Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2018-12-04T06:27:41.Z 0 [Note] InnoDB: Uses event mutexes 2018-12-04T06:27:41.Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier 2018-12-04T06:27:41.Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2018-12-04T06:27:41.Z 0 [Note] InnoDB: Number of pools: 1 2018-12-04T06:27:41.Z 0 [Note] InnoDB: Using CPU crc32 instructions 2018-12-04T06:27:41.Z 0 [Note] InnoDB: Initializing buffer pool, total size = 640M, instances = 1, chunk size = 128M 2018-12-04T06:27:41.Z 0 [Note] InnoDB: Completed initialization of buffer pool 2018-12-04T06:27:41.Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2018-12-04T06:27:41.Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 2018-12-04T06:27:41.Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint and the end . 2018-12-04T06:27:41.Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2018-12-04T06:27:41.Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2018-12-04T06:27:41.Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2018-12-04T06:27:41.Z 0 [ERROR] Failed to initialize builtin plugins. 2018-12-04T06:27:41.Z 0 [ERROR] Aborting 2018-12-04T06:27:41.Z 0 [Note] Binlog end 2018-12-04T06:27:41.Z 0 [Note] Shutting down plugin 'MyISAM' 2018-12-04T06:27:41.Z 0 [Note] Shutting down plugin 'CSV' 2018-12-04T06:27:41.Z 0 [Note] /home/ebaserdb/bin/xpecd: Shutdown complete
可以看到ERROR的报错
这种报错多是因为机器异常断点导致InnoDB的事务日志文件ib_logfile0、ib_logfile1出现问题,在该日志比较大(比数据文件大)的时候可以用来恢复数据(成功率没保证)。
因此本问题的处理方式是将这两个日志文件重命名或者移到其他目录中:
mv /home/ebaserdb/data/redo/ib_logfile0 /home
mv /home/ebaserdb/data/redo/ib_logfile1 /home
然后重新启动数据库,就不会出现报错。
注意:
如果可能需要数据恢复,那么只需要保留原始的InnoDB日志文件以便后面需要的恢复操作。 如果MySQL服务器在上述过程之后成功启动,并且所有数据都完好无损,则可以丢弃原始的InnoDB日志文件,mysql成功启动之后会重新创建适当大小的新InnoDB日志文件。
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/53067.html