gpt4 book ai didi

mysql - InnoDB导致无法重启MySQL

转载 作者:行者123 更新时间:2023-12-05 02:12:24 30 4
gpt4 key购买 nike

我无法重启 MySQL 或从(InnoDB 表)恢复 MySQL

  • 我有一个使用 Ubuntu 16.04 的 WSL。由于“未知”的意外,早上我无法访问 MySQL。试图重新启动它并...所有错误。尝试了有关 InnoDB 和日志* 文件的所有建议。但不是成功。我备份了/var/lib/mysql 并重新安装了 WSL 的新实例 - Ubuntu 16.04

  • 尝试从物理备份文件(日志* & 数据文件 & 数据库目录)中恢复。但是仍然有同样的错误。

[更新 1]

遵循本指南:https://dba.stackexchange.com/questions/71596/restoring-mysql-tables-from-ibd-frm-and-mysqllogbin-files

  • 我已经重新安装了另一个 WSL
  • 按照指南从 .frm 和 .idb 恢复数据库
  • 一切顺利,直到 IMPORT TABLESPACE。MySQL 一直在说:错误 1812 (HY000):表 `dbname`.`table` 缺少表空间
2019-05-16T03:04:36.061132Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2019-05-16T03:04:36.207628Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2019-05-16T03:04:36.208347Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2019-05-16T03:04:36.472045Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-05-16T03:04:36.481592Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.26-0ubuntu0.16.04.1) starting as process 15703 ...
2019-05-16T03:04:36.503219Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-05-16T03:04:36.503655Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-05-16T03:04:36.503712Z 0 [Note] InnoDB: Uses event mutexes
2019-05-16T03:04:36.503749Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-05-16T03:04:36.503783Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-05-16T03:04:36.503823Z 0 [Note] InnoDB: Using Linux native AIO
2019-05-16T03:04:36.504677Z 0 [Note] InnoDB: Number of pools: 1
2019-05-16T03:04:36.505431Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-05-16T03:04:36.521629Z 0 [ERROR] InnoDB: Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB.
2019-05-16T03:04:36.521855Z 0 [Note] InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf
2019-05-16T03:04:36.521899Z 0 [Warning] InnoDB: Linux Native AIO disabled.
2019-05-16T03:04:36.525155Z 0 [Note] InnoDB: Initializing buffer pool, total size = 4G, instances = 8, chunk size = 128M
2019-05-16T03:04:37.245621Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-05-16T03:04:37.452784Z 0 [Note] InnoDB: page_cleaner coordinator priority: -20
2019-05-16T03:04:37.453044Z 0 [Note] InnoDB: page_cleaner worker priority: -20
2019-05-16T03:04:37.453378Z 0 [Note] InnoDB: page_cleaner worker priority: -20
2019-05-16T03:04:37.453477Z 0 [Note] InnoDB: page_cleaner worker priority: -20
2019-05-16T03:04:37.461387Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-05-16T03:04:37.587188Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 22709914082 and the end 22709914054.
2019-05-16T03:04:37.587391Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-05-16T03:04:37.890878Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-05-16T03:04:37.891081Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-05-16T03:04:37.891128Z 0 [ERROR] Failed to initialize builtin plugins.
2019-05-16T03:04:37.891164Z 0 [ERROR] Aborting

2019-05-16T03:04:37.891207Z 0 [Note] Binlog end
2019-05-16T03:04:37.891332Z 0 [Note] Shutting down plugin 'CSV'
2019-05-16T03:04:37.891962Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-05-16T03:04:37.959132Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended ````

最佳答案

对于 [ERROR] InnoDB:此平台不支持 Linux native AIO 接口(interface)。请检查您的操作系统文档并安装适当的 InnoDB 二进制文件。:
解决方案:
/etc/mysql/my.cnf

添加以下行
[mysqld]
innodb_use_native_aio = 0

对于[ERROR] InnoDB:由于在检查点 92858715 和结尾 92858687 之间缺少 MLOG_CHECKPOINT 而忽略重做日志。:
解决方案:
/var/lib/mysql 中删除ib_logfiles

sudo rm -rf /var/lib/mysql/ib_logfile*

关于mysql - InnoDB导致无法重启MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56160301/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com