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

问题描述 投票:0回答:1

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

我们希望在新实例上恢复该数据,以便我们继续运行我的操作,但在尝试运行新安装的mysql后,服务停止,错误1067.它建议删除InnoDB创建的所有文件:所有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配置文件中指定日志文件大小。但我不知道如何去做。

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

mysql database innodb data-recovery mysql-error-1067
1个回答
0
投票

在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

© www.soinside.com 2019 - 2024. All rights reserved.