我尝试在 CentOS Stream 虚拟机上将 MariaDB 服务器从 10.3 更新到 10.11.7。
我使用了以下语句:
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version="mariadb-10.11"
sudo yum update mariadb-server
sudo systemctl restart mariadb
这给我带来了以下错误systemctl status mariadb.service
:
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] InnoDB: No valid checkpoint was found; the log was created with MariaDB 10.3.28.
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [Note] InnoDB: Starting shutdown...
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [Note] Plugin 'FEEDBACK' is disabled.
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] Unknown/unsupported storage engine: InnoDB
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] Aborting
May 13 10:32:34 Dev-DB systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
May 13 10:32:34 Dev-DB systemd[1]: mariadb.service: Failed with result 'exit-code'.
May 13 10:32:34 Dev-DB systemd[1]: Failed to start MariaDB 10.11.7 database server.
使用journalctl -xe
我得到以下输出:
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] InnoDB: Obtaining redo log encryption key version 1 failed (4294967295). Maybe the key or the required encryption key management plugin was not found.
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] InnoDB: Reading checkpoint encryption info failed.
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] InnoDB: Obtaining redo log encryption key version 1 failed (4294967295). Maybe the key or the required encryption key management plugin was not found.
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] InnoDB: Reading checkpoint encryption info failed.
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] InnoDB: No valid checkpoint was found; the log was created with MariaDB 10.3.28.
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [Note] InnoDB: Starting shutdown...
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [Note] Plugin 'FEEDBACK' is disabled.
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] Unknown/unsupported storage engine: InnoDB
May 13 10:32:34 Dev-DB mariadbd[1158171]: 2024-05-13 10:32:34 0 [ERROR] Aborting
我已经尝试过此线程的解决方案Getting error "Plugin 'InnoDB' Registration as a STORAGE ENGINE failed" when Starting MySQL:到目前为止我已经尝试过:
- 重命名/移动 ib_logfile0 和 ib_logfile1 文件
- innodb_force_recovery = 1
这两个选项都没有解决我的问题。
我该如何解决这个问题?
升级之前必须彻底关闭 MariaDB。在数据目录上启动 10.3 增益并确保完全完成关闭。
错误不是:
这可以适用于任何 innodb 错误,从 OP 链接问题上的权限被拒绝到更内部的错误,例如早期错误消息中明显的错误。因此,对于遇到的问题,任何建议都是完全错误的。
根据官方文档,重做日志 - iblogfile[01] 不得移动/删除/编辑。MariaDB 的更高版本将不允许您在没有它们的情况下开始。
所以: