InnoDB: Attempted to open a previously opened tablespace

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

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

  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.


I got the same error. These are the steps I followed.

  1. Took the backup of \xampp\mysql\data

  2. Removed all the files and folders from data folder except mysql

  3. Quit and started the XAMPP again.

  4. Move the databases from data folder one by one.


try to rename /Applications/XAMPP/xamppfiles/var/mysql/ib_logfile0 to /Applications/XAMPP/xamppfiles/var/mysql/ib_logfile0.bkp

and /Applications/XAMPP/xamppfiles/var/mysql/ib_logfile1 to /Applications/XAMPP/xamppfiles/var/mysql/ib_logfile1.bkp


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.