InnoDB:试图打开以前打开的表空间

InnoDB: Attempted to open a previously opened tablespace(InnoDB:试图打开以前打开的表空间)
本文介绍了InnoDB:试图打开以前打开的表空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这几天一直在解决一个问题.位于我们 Box 帐户上的本地 mediawiki 页面已自行销毁,我们一直在努力使其上线.使用 XAMPP 控制面板 v3.2.1,错误很多,因此我们决定更新 XAMPP (v3.2.2) 并将htdocs"和mysql/data"文件移至新数据库.

I have been working on a problem for a few days now. Our local mediawiki page that sits on our box account, destroyed itself and we've been working to get it online. Using XAMPP Control Panel v3.2.1, the errors were numerous so we decided to update XAMPP (v3.2.2) and move the 'htdocs' and 'mysql/data' files over to the new data base.

第一个错误:

    9:50:21 AM  [mysql]     Attempting to start MySQL app...
    9:50:22 AM  [mysql]     Status change detected: running
    9:50:22 AM  [mysql]     Status change detected: stopped
    9:50:22 AM  [mysql]     Error: MySQL shutdown unexpectedly.
    9:50:22 AM  [mysql]     This may be due to a blocked port, missing dependencies, 
    9:50:22 AM  [mysql]     improper privileges, a crash, or a shutdown by another method.
    9:50:22 AM  [mysql]     Press the Logs button to view error logs and check
    9:50:22 AM  [mysql]     the Windows Event Viewer for more clues
    9:50:22 AM  [mysql]     If you need more help, copy and post this
    9:50:22 AM  [mysql]     entire log window on the forums

正如它所说,然后我去日志发现了这个:

As it says, I then went to the logs and found this:

    2015-11-20 09:50:22 11f8 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.
    2015-11-20  9:50:22 4600 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    2015-11-20  9:50:22 4600 [Note] InnoDB: The InnoDB memory heap is disabled
    2015-11-20  9:50:22 4600 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
    2015-11-20  9:50:22 4600 [Note] InnoDB: Memory barrier is not used
    2015-11-20  9:50:22 4600 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2015-11-20  9:50:22 4600 [Note] InnoDB: Not using CPU crc32 instructions
    2015-11-20  9:50:22 4600 [Note] InnoDB: Initializing buffer pool, size = 16.0M
    2015-11-20  9:50:22 4600 [Note] InnoDB: Completed initialization of buffer pool
    2015-11-20  9:50:22 4600 [Note] InnoDB: Highest supported file format is Barracuda.
    2015-11-20  9:50:22 4600 [Note] InnoDB: The log sequence numbers 1665234 and 1665234 in ibdata files do not match the log sequence number 50125498 in the ib_logfiles!
    2015-11-20  9:50:22 4600 [Note] InnoDB: Database was not shutdown normally!
    2015-11-20  9:50:22 4600 [Note] InnoDB: Starting crash recovery.
    2015-11-20  9:50:22 4600 [Note] InnoDB: Reading tablespace information from the .ibd files...
    2015-11-20  9:50:22 4600 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace phpmyadmin/pma__tracking uses space ID: 21 at filepath: .phpmyadminpma__tracking.ibd. Cannot open tablespace wiki/archive which uses space ID: 21 at filepath: .wikiarchive.ibd
    InnoDB: Error: could not open single-table tablespace file .wikiarchive.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.

现在这看起来像是一个标准错误,我在整个网络上看到了许多关于如何修复它的不同建议.我将简要介绍它们.

Now this looks like a standard error that I've seen with many different suggestions throughout the web on how to fix it. I will go over them briefly.

我尝试的第一件事是遵循日志中的建议.

The first thing I tried was to follow the suggestions in the log.

  1. 没有权限问题
  2. 不清楚我是否需​​要该表,或者是否要摆脱 phpmyadmin/pma__tracking 或 archive.ibd.当我删除archive.ibd 时,错误只是传递到另一个.ibd 文件.
  3. 'innodb_force_recovery=1' 被添加到 my.cnf 中,这会导致一堆错误.

接下来我注意到的是,当我们构建新数据库时,我的 phpMyAdmin (localhost/phpMyAdmin) 中出现了这个错误:phpMyAdmin 错误

The next thing I noticed is that when we built the new database, I got this error in my phpMyAdmin (localhost/phpMyAdmin): phpMyAdmin error

我不确定这是否导致了我所有的问题.我发现人们说要将密码切换为=''.可能会发生此错误,因为我在新数据库中输入旧数据文件夹.我不确定.

I'm not sure if this is causing all of my problems or not. I found that people were saying to switch a password to =''. This error might be happening because I'm entering old data folders in a new database. I'm not sure.

网络上的第一个建议是从

The first suggestion on the web was to remove the following files from

mysqldata:
    innodb_index_stats.frm
    innodb_index_stats.ibd 
    innodb_table_stats.frm 
    innodb_table_stats.ibd 
    slave_master_info.ibd 
    slave_relay_log_info.frm 
    slave_relay_log_info.ibd 
    slave_worker_info.frm 
    slave_worker_info.ibd

第二次:

我已尝试删除ibdata1"

I've tried removing 'ibdata1'

这些都不起作用.

推荐答案

我也遇到了同样的问题.我尝试了其他人提出的所有解决方案,但不幸的是没有任何效果.

I had the same problem. I tried all the solution others has proposed, and unfortunately nothing worked.

花了几个小时在 Google 中搜索解决方案后,我终于找到了这个

After spending hours on searching for the solution in Google I finally found this

  1. 打开 my.ini(基于 linux 的系统和 Mac 上的 my.cnf)
  2. 寻找 [mysqld]
  3. 就在 [mysqld] 下方插入 innodb_force_recovery = 1
  4. 启动 MySQL 服务
  5. 停止 MySQL 服务
  6. 从 my.ini 中删除该行 (innodb_force_recovery = 1)
  7. 启动 MySQL 服务

在我的情况下工作完美.

Worked perfect in my case.

希望这能解决你的问题.

I hope this will solve your problem.

这篇关于InnoDB:试图打开以前打开的表空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)