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

Test MySQL Connection

The following is a great way to verify a MySQL / MariaDB database connection issue. Create a file...

What is the proper MariaDB - MySQL import and export format?

The easiest way to import and export a database is via the backup section of our hosting control...

What is the path to PHP5?

We are currently running the latest stable version of PHP5. /usr/bin/php

Could not connect to the MariaDB - MySQL database

You will want to verify you are using the correct database name, username and password.All...

Warning: Unknown(): open_basedir restriction in effect.

Basedir restriction is set for security. This most often occurs when you are calling an app...