XAMPP/MySQL: 重启 MySQL 后无法打开单表表空间文件 .mysqlinnodb_index_stats.ibd [英] XAMPP/MySQL: could not open single-table tablespace file .mysqlinnodb_index_stats.ibd after restart of MySQL

查看:21
本文介绍了XAMPP/MySQL: 重启 MySQL 后无法打开单表表空间文件 .mysqlinnodb_index_stats.ibd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在本地 XAMPP 服务器上安装了 Drupal.它一切正常,在我重新启动 XAMPP 之前,包含和使用数据库/站点没有问题.从那时起,我在我的日志文件中得到以下信息:

I've installed Drupal on my local XAMPP Server. It worked all fine, no problems with including and working with the database/site till i restarted XAMPP. Since then I get the following at my logfile:

2013-09-02 16:18:46 2544 [注意] 插件联邦"已禁用.

2013-09-02 16:18:46 2544 [Note] Plugin 'FEDERATED' is disabled.

2013-09-02 16:18:46 3e8 InnoDB:警告:不推荐使用 innodb_additional_mem_pool_size.此选项可能会在未来版本中与选项 innodb_use_sys_malloc 和 InnoDB 的内部内存分配器一起删除.

2013-09-02 16:18:46 3e8 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.

2013-09-02 16:18:46 2544 [注意] InnoDB:InnoDB 内存堆被禁用

2013-09-02 16:18:46 2544 [Note] InnoDB: The InnoDB memory heap is disabled

2013-09-02 16:18:46 2544 [注意] InnoDB:互斥锁和 rw_locks 使用 Windows 互锁函数

2013-09-02 16:18:46 2544 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions

2013-09-02 16:18:46 2544 [注意] InnoDB:压缩表使用 zlib 1.2.3

2013-09-02 16:18:46 2544 [Note] InnoDB: Compressed tables use zlib 1.2.3

2013-09-02 16:18:46 2544 [注意] InnoDB:未使用 CPU crc32 指令

2013-09-02 16:18:46 2544 [Note] InnoDB: Not using CPU crc32 instructions

2013-09-02 16:18:46 2544 [注意] InnoDB:初始化缓冲池,大小 = 16.0M

2013-09-02 16:18:46 2544 [Note] InnoDB: Initializing buffer pool, size = 16.0M

2013-09-02 16:18:46 2544 [注意] InnoDB:缓冲池初始化完成

2013-09-02 16:18:46 2544 [Note] InnoDB: Completed initialization of buffer pool

2013-09-02 16:18:46 2544 [注意] InnoDB:支持的最高文件格式是 Barracuda.

2013-09-02 16:18:46 2544 [Note] InnoDB: Highest supported file format is Barracuda.

2013-09-02 16:18:47 2544 [注意] InnoDB: ibdata 文件中的日志序列号 1600614 和 1600614 与 ib_logfiles 中的日志序列号 1600644 不匹配!

2013-09-02 16:18:47 2544 [Note] InnoDB: The log sequence numbers 1600614 and 1600614 in ibdata files do not match the log sequence number 1600644 in the ib_logfiles!

2013-09-02 16:18:47 2544 [注意] InnoDB:数据库没有正常关闭!

2013-09-02 16:18:47 2544 [Note] InnoDB: Database was not shutdown normally!

2013-09-02 16:18:47 2544 [注意] InnoDB:启动崩溃恢复.

2013-09-02 16:18:47 2544 [Note] InnoDB: Starting crash recovery.

2013-09-02 16:18:47 2544 [注意] InnoDB:从 .ibd 文件中读取表空间信息...

2013-09-02 16:18:47 2544 [Note] InnoDB: Reading tablespace information from the .ibd files...

2013-09-02 16:18:47 2544 [错误] InnoDB:试图打开以前打开的表空间.以前的表空间 drupal/variable 在文件路径中使用空间 ID:2:.drupalvariable.ibd.无法打开表空间 mysql/innodb_index_stats,它在文件路径中使用空间 ID:2:.mysqlinnodb_index_stats.ibd

2013-09-02 16:18:47 2544 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace drupal/variable uses space ID: 2 at filepath: .drupalvariable.ibd. Cannot open tablespace mysql/innodb_index_stats which uses space ID: 2 at filepath: .mysqlinnodb_index_stats.ibd

InnoDB:错误:无法打开单表表空间文件 .mysqlinnodb_index_stats.ibd

InnoDB: Error: could not open single-table tablespace file .mysqlinnodb_index_stats.ibd

InnoDB:我们不继续崩溃恢复,因为表可能会变成

InnoDB: We do not continue the crash recovery, because the table may become

InnoDB:如果我们无法将 InnoDB 日志中的日志记录应用到它,则会损坏.

InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.

InnoDB:修复问题并启动mysqld:

InnoDB: To fix the problem and start mysqld:

InnoDB: 1) 如果文件存在权限问题,mysqld不能

InnoDB: 1) If there is a permission problem in the file and mysqld cannot

InnoDB:打开文件,需要修改权限.

InnoDB: open the file, you should modify the permissions.

InnoDB:2) 如果不需要该表,或者您可以从备份中恢复它,

InnoDB: 2) If the table is not needed, or you can restore it from a backup,

InnoDB:然后可以删除.ibd文件,InnoDB就正常了

InnoDB: then you can remove the .ibd file, and InnoDB will do a normal

InnoDB:崩溃恢复并忽略该表.

InnoDB: crash recovery and ignore that table.

InnoDB: 3) 如果文件系统或磁盘损坏,无法删除

InnoDB: 3) If the file system or the disk is broken, and you cannot remove

InnoDB:.ibd文件,可以设置innodb_force_recovery >0 在 my.cnf

InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf

InnoDB:并在此处强制 InnoDB 继续崩溃恢复.

InnoDB: and force InnoDB to continue crash recovery here.

我通过 google 寻找了一个解决方案,但似乎只是 Drupal 数据库有问题,因为如果我删除数据库,它可以与 MySQL 连接.

I looked for a solution via google but it seems to be a problem just with the drupal database because it's able to connect with MySQL if I remove the database.

我希望有人能帮助我:(.

I hope someone could help me :(.

推荐答案

dev_khan,尝试在启用 innodb_force_recovery 选项的情况下以只读模式重新启动 MySQL:

dev_khan, try restarting MySQL in Read-Only mode with the innodb_force_recovery option enabled:

  1. 编辑 my.cnf - 找到该行:# innodb_force_recovery = 2
  2. 注释掉(去掉#)
  3. 重启 MySQL 让 MySQL 引擎自行修复.
  4. 再次注释 innodb_force_recovery 行(添加 #)
  5. 再次重启 MySQL,您就可以再次获得完全访问权限,而没有只读限制.

来自德国的问候

这篇关于XAMPP/MySQL: 重启 MySQL 后无法打开单表表空间文件 .mysqlinnodb_index_stats.ibd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆