大网数据广告活动
服务器运维问答

MYSQL: Upgrade is not supported after a crash or shutdown with innodb_fast_shutdown = 2

· 52CE 我爱测

I have a mysql server running in a docker container. I tried to upgrade the database from version 8.0.29 to version 8.0.30. However, when starting, the following error occurred: 2022-09-06T13:13:39.928986Z 0 [System] [MY-010116] …

问题原文

原帖链接 · Tamino Elgert · CC BY-SA 4.0

I have a mysql server running in a docker container. I tried to upgrade the database from version 8.0.29 to version 8.0.30. However, when starting, the following error occurred:

2022-09-06T13:13:39.928986Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-09-06T13:13:40.701091Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-09-06T13:13:40.954725Z 1 [ERROR] [MY-012526] [InnoDB] Upgrade is not supported after a crash or shutdown with innodb_fast_shutdown = 2. This redo log was created with MySQL 8.0.29, and it appears logically non empty. Please follow the instructions at http://dev.mysql.com/doc/refman/8.0/en/upgrading.html
2022-09-06T13:13:40.954752Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
2022-09-06T13:13:41.328075Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-09-06T13:13:41.328265Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-09-06T13:13:41.328299Z 0 [ERROR] [MY-010119] [Server] Aborting

Then I tried to start again in version 8.0.29, but that no longer works either - error message is:

2022-09-06T13:31:18.544142Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 1
2022-09-06T13:31:18.682671Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-09-06T13:31:24.588234Z 1 [ERROR] [MY-013171] [InnoDB] Cannot boot server version 80029 on data directory built by version 80030. Downgrade is not supported
mysqld: Can't open file: 'mysql.ibd' (errno: 0 - )
2022-09-06T13:31:25.243497Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-09-06T13:31:25.243720Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-09-06T13:31:25.243968Z 0 [ERROR] [MY-010119] [Server] Aborting

Any ideas how I can solve the problem?

已采纳解答

原帖链接 · longneck · CC BY-SA 4.0

First take a backup of your mysql data directory. Then delete the files ib_logfile*. When you start mysql, it will create new, empty log files.

Also, running with innodb_fast_shutdown = 2 is a bad idea. Change it to 1. You will still be able to shut down quickly, but mysql will do the minimum possible to get your files in to a consistent, upgradeable state. As you have found, this is important when running Docker where your software versions can be independent of your data.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2022-09-06)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。