InnoDB:尝试打开以前打开的表空间 [英] InnoDB: Attempted to open a previously opened tablespace

查看:62
本文介绍了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: .\phpmyadmin\pma__tracking.ibd. Cannot open tablespace wiki/archive which uses space ID: 21 at filepath: .\wiki\archive.ibd
    InnoDB: Error: could not open single-table tablespace file .\wiki\archive.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

\mysql\data:
    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服务
  1. Open my.ini (my.cnf on linux-based systems and Mac)
  2. Look for [mysqld]
  3. Just below [mysqld] insert innodb_force_recovery = 1
  4. Start MySQL Service
  5. Stop MySQL Service
  6. Remove the line from my.ini (innodb_force_recovery = 1)
  7. Start MySQL Service

在我的情况下工作完美.

Worked perfect in my case.

我希望这能解决您的问题.

I hope this will solve your problem.

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

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