InnoDB Error Attempted to open a previously opened 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. 

 

This can happen if the MySQL server was shut down unexpectedly or if there is a problem with the file system.

 

Check the permissions on the tablespace file. Make sure that the user running MySQL has read and write permissions on the file.
Try restarting MySQL with the innodb_force_recovery parameter set to 1. This will force MySQL to ignore any errors and continue running.
If the error persists, you may need to restore your database from a backup.


Performing the following may also 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)

The Previous tablespace part of the message tells you the name of the tablespace that MySQL is trying to open.
The innodb_force_recovery parameter is a setting in the MySQL configuration file that allows you to force MySQL to ignore errors and continue running.

 

 

  • 6 Kunder som kunne bruge dette svar

Hjalp dette svar dig?

Relaterede artikler

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

Sure, here are the steps on how to import and export databases using phpMyAdmin in your control...

Clean - Shrink ibdata1

To shrink ibdata1 once and for all you must do the following:MySQLDump all databases into a SQL...

When trying to connect to MariaDB or MySQL you receive error 2003 Cannot connect to MySQL on xxxxxx on port 3306 10060

The error 2003 "Cannot connect to MySQL on xxxxxx on port 3306 10060" means that the MySQL...

What is the Path to ImageMagick?

The path to ImageMagick on Ultra Web Hosting is /usr/bin/. This means that you can access...

How do I backup a MariaDB - MySQL Database?

Here are the steps on how to backup a MySQL database using phpMyAdmin in your Ultra Web Hosting...