gpt4 book ai didi

MySql 服务不会从恢复的 ibdata1 文件启动

转载 作者:行者123 更新时间:2023-11-29 16:15:29 26 4
gpt4 key购买 nike

我们的一台服务器遭到了一群国际黑客的勒索软件攻击。因此,我们重新分组并重新开始,唯一不受影响的数据是存储在 mysql 程序数据文件夹中的 ibdata1 文件。

我们希望在新实例上恢复该数据,以便继续我们的操作,但是在尝试运行新安装的 mysql 后,服务停止并出现错误 1067。它建议删除 InnoDB 创建的所有文件:all ibdata 文件和所有 ib_logfile 文件。如果我这样做,服务将运行,但我不能这样做,因为我需要访问这个特定数据文件中的数据。我还在我的 .cnf 文件中添加了这两行

innodb_force_recovery=6
innodb_fast_shutdown=0

这没有用。所以我只删除了日志文件,它创建了新的日志文件,随之而来的是这个错误

190223 11:38:48 [Note] Plugin 'FEDERATED' is disabled.
190223 11:38:48 InnoDB: The InnoDB memory heap is disabled
190223 11:38:48 InnoDB: Mutexes and rw_locks use Windows interlocked functions
190223 11:38:48 InnoDB: Compressed tables use zlib 1.2.3
190223 11:38:48 InnoDB: Initializing buffer pool, size = 2.0G
190223 11:38:48 InnoDB: Completed initialization of buffer pool
190223 11:38:48 InnoDB: highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/error-creating-innodb.html
190223 11:38:48 [ERROR] Plugin 'InnoDB' init function returned error.
190223 11:38:48 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190223 11:38:48 [ERROR] Unknown/unsupported storage engine: INNODB
190223 11:38:48 [ERROR] Aborting

Then I replaced the log files with the same ones I used with the original ibdata1 file then I got this error.

190223 12:11:26 [Note] Plugin 'FEDERATED' is disabled.
190223 12:11:26 InnoDB: The InnoDB memory heap is disabled
190223 12:11:26 InnoDB: Mutexes and rw_locks use Windows interlocked functions
190223 12:11:26 InnoDB: Compressed tables use zlib 1.2.3
190223 12:11:26 InnoDB: Initializing buffer pool, size = 2.0G
190223 12:11:26 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 1073741824 bytes
InnoDB: than specified in the .cnf file 0 224395264 bytes!
190223 12:11:26 [ERROR] Plugin 'InnoDB' init function returned error.
190223 12:11:26 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190223 12:11:26 [ERROR] Unknown/unsupported storage engine: INNODB
190223 12:11:26 [ERROR] Aborting

日志文件中的某处似乎有一个检查点,这是 mysql 服务正确读取数据文件所必需的。也许我需要在 my.ini 配置文件中指定日志文件大小。但我不知道该怎么办。

任何帮助在这里都会派上用场。

最佳答案

在 my.ini(或 my.cnf)文件中,添加(或替换)以下行:

innodb_log_file_size = 1024M

参见https://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_log_file_size了解详情。

关于MySql 服务不会从恢复的 ibdata1 文件启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54840701/

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