InnoDB: Error: Attempted to open a previously opened tablespace. Previous tablespace

When receiving the error

    "InnoDB: Error: Attempted to open a previously opened tablespace. Previous tablespace"

when running a systemctl status mariadb.service it can often indicate a failed tablespace file. 

Performing the following may rectify the issue:

  1. Open my.cnf
  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.cnf (or my.ini for Windows) (innodb_force_recovery = 1)
  7. Start MySQL Service
  8. Run a "tail -f /var/log/mysql/`servername`.log" and watch for further errors. If the tablespace issue reoccurs backup the database, remove the database, remove the files associated it @ /var/log/mysql/username_database* and reimporting it will often correct the .id file(s)
  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How do I add a user to a MariaDB & MySQL database?

In the MariaDB / MySQL Database section of your hosting control panel, after creating a database...

Increase PHP Memory

Fatal error: Allowed memory size of xxxxxxxxx bytes exhausted (tried to allocate 1064256 bytes)....

Learn MariaDB

MariaDB is a drop-in replacement for MySQL. The lead developer and founder of MySQL, Michael...

How do I change my PHP settings?

How do I change my PHP / PHP.INI settings?To change your PHP settings, just login to your hosting...

Warning: system() has been disabled for security reasons

system is a feature of php which is disabled by default. To change this if needed for a...