InnoDB: Attempted to open a previously opened tablespace

后端 未结 11 1845
灰色年华
灰色年华 2020-12-22 22:34

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

相关标签:
11条回答
  • 2020-12-22 23:18

    I had the same problem, after use recovery database structure ( http://zadpen.com/20-restore-lost-data-in-mysql-using-innodb-engine-without-file-ibdata1.html ) I remove the archive.ibm file and start mysql. then create archive table in database.

    0 讨论(0)
  • Solution is for MAC 10.11.3 El Captian

    • Go to /Applications/XAMPP/xamppfiles/var/mysql/
    • Delete all random files (except the actual database folders)
    • Restart Apache and MySQL.

    This worked for me.

    0 讨论(0)
  • 2020-12-22 23:27

    I had a similar problem with Mamp Pro. For me it turned out the correct .idb-files were not located at "Applications/Mamp...". So taking a closer look at the error-log it showed me the files were located at "/Library/Application Support/appsolute/MAMP PRO/db". As I had problems with a database I wasn't using anymore, I just tried to delete the corresponding folder and it worked out. The next step would have been to delete the files already mentioned by the author.

    • 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

    But as mentioned deleting the databasefolder worked out great.

    0 讨论(0)
  • 2020-12-22 23:30

    "Attempted to open a previously opened tablespace." -- That smells like one of these:

    • There are two copies of MySQL and both are trying to run.
    • Windows failed to release an 'open' on one of MySQL's files. I used to see that problem. It was cured by rebooting Windows; later by upgrading Windows.
    0 讨论(0)
  • 2020-12-22 23:35

    Tgr's answer looks appropriate. The message about permissions etc. is a generic one; the actual error message is

    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
    

    Your wiki database and phpmyadmin database somehow ended up with the same tablespace ID. Each would work fine if the other wasn't present; as it is now, you'll have to renumber one of them somehow.

    0 讨论(0)
提交回复
热议问题