首页 > 数据库 >mysql重启失败

mysql重启失败

时间:2023-02-06 23:45:40浏览次数:31  
标签:11 02 重启 mysql Note 失败 2023 InnoDB 06T15

一、问题背景

部署项目的虚机异常重启,利用docker部署的mysql重启失败

二、报错截图如下
2023-02-06 15:11:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.37-1debian10 started.
2023-02-06 15:11:00+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-02-06 15:11:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.37-1debian10 started.
2023-02-06T15:11:00.854091Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2023-02-06T15:11:00.859582Z 0 [Note] mysqld (mysqld 5.7.37) starting as process 1 ...
2023-02-06T15:11:00.866111Z 0 [Note] InnoDB: PUNCH HOLE support available
2023-02-06T15:11:00.866176Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-02-06T15:11:00.866182Z 0 [Note] InnoDB: Uses event mutexes
2023-02-06T15:11:00.866184Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2023-02-06T15:11:00.866187Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-02-06T15:11:00.866189Z 0 [Note] InnoDB: Using Linux native AIO
2023-02-06T15:11:00.867459Z 0 [Note] InnoDB: Number of pools: 1
2023-02-06T15:11:00.867813Z 0 [Note] InnoDB: Using CPU crc32 instructions
2023-02-06T15:11:00.875232Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2023-02-06T15:11:00.899354Z 0 [Note] InnoDB: Completed initialization of buffer pool
2023-02-06T15:11:00.907222Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2023-02-06T15:11:00.925448Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2023-02-06T15:11:00.928520Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 33357625 and the end 33357312.
2023-02-06T15:11:00.928577Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2023-02-06T15:11:01.537789Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2023-02-06T15:11:01.537812Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2023-02-06T15:11:01.537817Z 0 [ERROR] Failed to initialize builtin plugins.
2023-02-06T15:11:01.537820Z 0 [ERROR] Aborting

2023-02-06T15:11:01.537831Z 0 [Note] Binlog end
2023-02-06T15:11:01.537870Z 0 [Note] Shutting down plugin 'CSV'
2023-02-06T15:11:01.538218Z 0 [Note] mysqld: Shutdown complete

三、我的项目配置如下

mysql 版本是5.7

四、分析问题
五、问题原因

这个问题呈现在 MySQL 5.7 之后的版本,次要的起因是 MySQL 会在最新的 checkpoint 实现后都会在 redo log 写一个一字节的 MLOG_CHECKPOINT 标记,用来标记在此之前的 redo 都已 checkpoint 实现。如果处于任何起因没有找到这个标记,那么整个 redo log 文件都会被疏忽。呈现这个谬误的话,最好是有备份进行复原,如果没有做好备份,那只能采取非常规的启动形式,但可能造成数据失落。

六、解决方式

先备份数据目录下ib_logfile0、ib_logfile1两个文件,再删除后重新启动mysql;
网上资料也有许多显示修改配置 innodb_force_recovery 的,不过对这个不熟悉,而且删除上面两个文件重启服务就行了,也就没有修改配置

标签:11,02,重启,mysql,Note,失败,2023,InnoDB,06T15
From: https://www.cnblogs.com/fyusac/p/17097043.html

相关文章

  • MySQL常见的几种优化方案
    Mysql常见优化分类:select[字段优化1]:主要是覆盖索引from[表]where[条件优化2]union[联合查询优化3]新建表CREATETABLE`student`(`id`int(11)NOT......
  • MySQL插入数据的多种方式
    插入数据的多种方式直接通过insert语句插入语法:INSERT[INTO]tbl_name[(col_name[,col_name]...)]{{VALUES|VALUE}(value_list)[,(value_list)]........
  • mysql批量kill语句
    mysql服务器负载太大,卡死mysql>SELECTconcat('KILL',id,';')FROMinformation_schema.processlistWHEREuser='root';+------------------------+|concat('KILL......
  • python2.7 + MySQL 拼接SQL语句的技巧 (处理unicode,时间)
    背景在Python2.7中,可以使用单引号,双引号,三引号表示字符串,当字符串的值为中文时,则会默认转换成unicode。但是在MYSQL中,使用SQL语句时,直接用unicode作为列的查询条件(例如......
  • 设置MySQL log_bin重启失败的原因
    在设置log_bin二进制日志文件之后重启mysql服务显示滴启动失败然后查询资料发现没有配置server_id,配置server_id=1之后重启就OK了,servier_id的作用1、MySQL的同步的......
  • mysql concat函数的用法
    mysql中的这个函数非常强大,可以对查出的参数进行拼接,其实这个方法在java中也有api可以进行调用。那么什么时候进行使用呢?例如,你老大叫你做一个数据库的数据采集,需要整理成......
  • mysql 日期和时间戳的转换
    (18条消息)MySQL日期和时间戳的转换|以及DATE_FORMAT()用法_慌途L的博客-CSDN博客_date_format能转换时间戳吗一小时的时间戳是2*3600*1000,这是13位的时间戳的用法,如......
  • MySQL 8.0 新特性之 Clone Plugin
    转载:ClonePlugin......
  • DW集训营数据库Mysql梳理(二)
    导入示例数据库首先创建并打开数据库,接着在数据库下执行sql或者将sql语句复制执行sql语句。SQL是什么?MySQL是什么?SQL即结构化查询语言(StructuredQueryLanguage),是一种特......
  • DW集训营数据库Mysql梳理(四)
    MySQL基础–表联结学习内容1.MySQL别名别名除了允许用于列名和计算字段外,SQL还允许给表名起别名,好处在于:(1)缩短SQL语句;(2)允许在一条SELECT语句中多次使用相同的表。为......