gpt4 book ai didi

mysql - 错误 : could not open single-table tablespace file .\scrapers\records.ibd

转载 作者:搜寻专家 更新时间:2023-10-30 20:01:36 24 4
gpt4 key购买 nike

我在 Windows 10 上安装了 AMPPS。

我无法启动 MySQL。我搜索了这个错误并尝试了不同的方法来恢复我的数据。

这是错误日志:

2016-02-03 10:19:54 6448 [Warning] You need to use --log-bin to make --binlog-format work.
2016-02-03 10:19:54 6448 [Note] Plugin 'FEDERATED' is disabled.
2016-02-03 10:19:54 6448 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-02-03 10:19:54 6448 [Note] InnoDB: The InnoDB memory heap is disabled
2016-02-03 10:19:54 6448 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-02-03 10:19:54 6448 [Note] InnoDB: Memory barrier is not used
2016-02-03 10:19:54 6448 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-02-03 10:19:54 6448 [Note] InnoDB: Not using CPU crc32 instructions
2016-02-03 10:19:54 6448 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-02-03 10:19:54 6448 [Note] InnoDB: Completed initialization of buffer pool
2016-02-03 10:19:54 6448 [Note] InnoDB: Highest supported file format is Barracuda.
2016-02-03 10:19:54 6448 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 132125643 in the ib_logfiles!
2016-02-03 10:19:54 6448 [Note] InnoDB: Database was not shutdown normally!
2016-02-03 10:19:54 6448 [Note] InnoDB: Starting crash recovery.
2016-02-03 10:19:54 6448 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-02-03 10:19:54 6448 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/innodb_table_stats uses space ID: 1 at filepath: .\mysql\innodb_table_stats.ibd. Cannot open tablespace scrapers/openpasts_records which uses space ID: 1 at filepath: .\scrapers\openpasts_records.ibd
InnoDB: Error: could not open single-table tablespace file .\scrapers\openpasts_records.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.

我尝试在 my.cnf 中设置 innodb_force_recovery = 1

我也尝试删除 ibdata1 文件。

去掉ibdata1后,MySQL完美启动。

我的表格显示在 PHPmyADMIN 中,但是当我点击它时它说 table does not exists even it exists

在我的 D:\Ampps\mysql\data\scrapers 目录中,我可以看到 records.ibd 文件和 records.frm 文件以及。这意味着表实际存在但已损坏。

有人知道我该如何恢复那张 table 吗?

最佳答案

设置值

innodb_force_recovery = 1 

或 2 或 3 或 4在[mysql]下的my.ini文件中

试试这个,希望它能解决您的问题。

关于mysql - 错误 : could not open single-table tablespace file .\scrapers\records.ibd,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35184367/

24 4 0