每次启动 Mysql 数据库时,我都会在错误日志中看到:
131015 12:07:06 [Note] Plugin 'FEDERATED' is disabled. 131015 12:07:06 InnoDB: The InnoDB memory heap is disabled 131015 12:07:06 InnoDB: Mutexes and rw_locks use Windows interlocked functions 131015 12:07:06 InnoDB: Compressed tables use zlib 1.2.3 131015 12:07:06 InnoDB: Initializing buffer pool, size = 16.0M 131015 12:07:06 InnoDB: Completed initialization of buffer pool 131015 12:07:06 InnoDB: highest supported file format is Barracuda. InnoDB: The log sequence number in ibdata files does not match InnoDB: the log sequence number in the ib_logfiles! 131015 12:07:06 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 131015 12:07:07 InnoDB: Waiting for the background threads to start 131015 12:07:08 InnoDB: 5.5.32 started; log sequence number 1595695 131015 12:07:08 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306 131015 12:07:08 [Note] - '0.0.0.0' resolves to '0.0.0.0'; 131015 12:07:08 [Note] Server socket created on IP: '0.0.0.0'.
我试过 mysqlcheck -u root -p --repair -A 来修复数据库。这报告所有表都正常。
我也试过将 innodb_force_recovery 设置为 4
我试过 SET GLOBAL innodb_fast_shutdown = 1;并关闭数据库。
这些都不能使错误消失。
如何修复数据库中的 InnoDB 表?
最佳答案
我通过删除 "Xampp\mysql\data"
中的一些文件解决了我的问题:
- ib_logfile0
- ib_logfile1
- 数据1
** 请务必通过以下方式备份您的数据库:
[mysqld]
innodb_force_recovery = 2
(此命令将帮助您以只读模式启动Mysql。)
关于mysql - ibdata 文件中的日志序列号不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19378565/