MariaDB升级后导致 服务无法启动 的解决办法

闲着无聊,把CentOS7上的MariaDB10.5.1 通过 yum 升级到了 MariaDB10.5.2

然后就发现~~  mariadb服务挂了~~

systemctl start mariadb 

提示:

Job for mysqld.service failed because the control process exited with error code.
 See "systemctl status mysqld.service" and "journalctl -xe" for details.

看看其它信息

system status mariadb

提示:

mariadb could not increase number of max_open_files....
.................一堆乱七八糟的

好吧,我查mariadb的启动日志吧。

我的数据目录已经迁移到 /home/MysqlDB/mariadb.log

而你的应该在默认安装目录中,具体自己百度吧,我忘记在哪了。

打开之~我们只看故障发生后的结尾部分~

2020-04-20 15:34:59 0 [Note] InnoDB: Using Linux native AIO
2020-04-20 15:34:59 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-04-20 15:34:59 0 [Note] InnoDB: Uses event mutexes
2020-04-20 15:34:59 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
2020-04-20 15:34:59 0 [Note] InnoDB: Number of pools: 1
2020-04-20 15:34:59 0 [Note] InnoDB: Using generic crc32 instructions
2020-04-20 15:34:59 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2020-04-20 15:34:59 0 [Note] InnoDB: Completed initialization of buffer pool
2020-04-20 15:34:59 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-04-20 15:34:59 0 [ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 10.5.1.
2020-04-20 15:34:59 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-04-20 15:34:59 0 [Note] InnoDB: Starting shutdown...
2020-04-20 15:34:59 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-04-20 15:34:59 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-04-20 15:34:59 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-04-20 15:34:59 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2020-04-20 15:34:59 0 [ERROR] Aborting

注意第一个 error :Upgrade after a crash is not supported. The redo log was created with MariaDB 10.5.1.

它说:"不支持在崩溃后进行升级。redo日志是用MariaDB 10.5.1创建的。"

翻译成人话就是:由于redo log文件是早期版本(10.5.1)创建的,我不认识它。

参考了一个官方文档:https://mariadb.com/kb/en/upgrading-from-mariadb-101-to-mariadb-102/+comments/2903

处理办法是:删除mariadb目录下的 ib_logfile* 文件。

默认目录应该是在 /var/lib/mysql/ib_logfile*

 

把它改个名,然后尝试启动服务  systemctl start mariadb         ......

成功!

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值