---
title: MariaDB 日志文件损坏导致 OAT 无法启动的原因和解决方法-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于MariaDB 日志文件损坏导致 OAT 无法启动的原因和解决方法相关的常见问题和使用技巧，帮助您快速解决MariaDB 日志文件损坏导致 OAT 无法启动的原因和解决方法的难题。
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
[OceanBase AI 数据大会](https://www.oceanbase.com/conference2026 "OceanBase AI 数据大会")

## 体验新一代 AI 数据平台

[立即咨询](https://www.oceanbase.com/contactus) [免费试用 免费试用](https://www.oceanbase.com/free-trial)划线反馈

# MariaDB 日志文件损坏导致 OAT 无法启动的原因和解决方法

更新时间：2026-06-26 02:02

适用版本： V4.x 内容类型：Troubleshoot  

## 问题现象

启动 OAT 容器失败，进一步检查容器日志后发现，问题根源在于 MariaDB 进程启动失败。

通过查看 MariaDB 的运行日志，定位是 MariaDB 日志损坏，启动进程时 InnoDB 遇到日志扫描和文件级别的损坏方面报错。

```shell
2024-03-19 11:44:14 0 [Note] InnoDB: Dump from the start of the mini-transaction (LSN=32645050650) to 100 bytes after the record:
 len 103; hex 87750000208709263500808f31bf3900a007889007a4c9c1004700863328043097b40d012fddb4ae5c2fddb6804707a4c9bab409013097c3000c00b3002efac3000c00a022031c0080e100
0000000000e080000000000000127363616e5f646f636b65725f696d; asc  u     &5   1 9          G  3( 0    /   \/   G       0       .      "                    scan_docker_i
m;
2024-03-19 11:44:14 0 [Warning] InnoDB: Log scan aborted at LSN 32645065728
2024-03-19 11:44:14 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2024-03-19 11:44:14 0 [Note] InnoDB: Starting shutdown...
2024-03-19 11:44:15 0 [ERROR] Plugin 'InnoDB' init function returned error.
2024-03-19 11:44:15 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2024-03-19 11:44:15 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-03-19 11:44:15 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2024-03-19 11:44:15 0 [ERROR] Aborting
240319 11:44:15 mysqld_safe mysqld from pid file /data/db/mariadb.pid ended
240319 11:45:16 mysqld_safe Starting mariadbd daemon with databases from /data/db
2024-03-19 11:45:16 0 [Note] Starting MariaDB 10.6.14-MariaDB source revision c93754d45e5d9379e3e23d7ada1d5f21d2711f66 as process 144
2024-03-19 11:45:16 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2024-03-19 11:45:16 0 [Note] InnoDB: Number of pools: 1
2024-03-19 11:45:16 0 [Note] InnoDB: Using ARMv8 crc32 + pmull instructions
2024-03-19 11:45:16 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2024-03-19 11:45:16 0 [Warning] mariadbd: io_uring_queue_init() failed with errno 1
2024-03-19 11:45:16 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
2024-03-19 11:45:16 0 [Note] InnoDB: Initializing buffer pool, total size = 2147483648, chunk size = 134217728
2024-03-19 11:45:16 0 [Note] InnoDB: Completed initialization of buffer pool
2024-03-19 11:45:16 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=32645050650,32645050650
2024-03-19 11:45:16 0 [ERROR] InnoDB: Corrupted file-level record; set innodb_force_recovery=1 to ignore.
2024-03-19 11:45:16 0 [Note] InnoDB: Dump from the start of the mini-transaction (LSN=32645050650) to 100 bytes after the record:

```

## 问题原因

可能因为服务器突然断电等原因导致 MariaDB 日志损坏，无法启动 MariaDB 进程。

## 影响租户

影响 OceanBase 数据库中的 SYS 租户和 Oracle 租户以及 MySQL 租户。

## 适用版本

OAT V4.x 版本。

## 解决方法

1. 启动一个空的 OAT 容器。

   ```shell
   ##-- 注意要挂载当前 OAT 正在使用的数据目录。
   docker run -itd --net host --name oat_blank -v xxx:/data --entrypoint bash --restart on-failure:5 ${repo}:${tag}

   ```
 2. 进入空的 OAT 容器。

   ```shell
   docker exec -it oat_blank bash

   ```
 3. 编辑 `/etc/my.cnf.d/server.cnf` 文件。

   增加 `innodb_force_recovery=6`（4 以上会以只读模式启动，应该先从1开始尝试，如果能启动，通过 mysqldump 进行逻辑备份）。

   ```shell
   [mysqld]
   default-time-zone='+8:00'
   innodb_buffer_pool_size=2G
   max_connections = 1024
   innodb_file_per_table=on
   port=3306
   innodb_default_row_format=dynamic
   datadir=/data/db
   # log-error=/data/db/mariadb.log
   socket=/data/db/mysql.sock
   pid-file=mariadb.pid
   innodb_force_recovery=6

   ```
 4. 在容器中启动 MariaDB 进程。

   ```shell
   /usr/bin/mysqld_safe --user=root  &

   ```
 5. 进行逻辑备份。

   在容器中使用 mysqldump 导出 OAT 和 AIRFLOW 这两个数据库。

   ```shell
   mysqldump -u [username] -p[password] --databases [database1_name] [database2_name] > [filename].sql

   ```
 6. 删除数据目录。

   备份 `/data/db` 目录，并删除容器中 `/data/db/oat`、 `/data/db/airflow` 这两个目录。
 7. 进行逻辑恢复。

   ```shell
   mysql -u username -p[password] < [filename].sql

   ```

   并检查 database 里面的数据是否恢复。
 8. 删除 `oat_blank` 容器，重启之前的 OAT 容器，验证服务与数据是否正常。

上一篇

[如何修改 OAT 日志保存时间](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000001794047)

下一篇

[OAT 中 MariaDB 连接数打满或内存不足的原因和解决方法](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000001794048) ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ) 咨询
