Symptoms
-
The following error is shown in Plesk:
ERROR: PleskMainDBException
MySQL query failed: Incorrect information in file: './psa/misc.frm'
ERROR: PleskDBException: Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible. (Abstract.php:69)
ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory
ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] Connection refused:
0: /usr/local/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php:144 - Unable to start MySQL/MariaDB service with the following error in /var/log/mysql/error.log, /var/log/mysqld.log, or /var/log/mariadb/mariadb.log:
InnoDB: Waiting for the background threads to start
InnoDB: Error: tablespace size stored in header is 3712 pages, but
InnoDB: the sum of data file sizes is only 3072 pages
InnoDB: Cannot start InnoDB. The tail of the system tablespace is
InnoDB: missing. Have you edited innodb_data_file_path in my.cnf in an
InnoDB: inappropriate way, removing ibdata files from there?
InnoDB: You can set innodb_force_recovery=1 in my.cnf to force
InnoDB: a startup if you are trying to recover a badly corrupt database. -
Domain overview page on Domains > example.com is not accessible:
500 Server Error
Type SB_Facade_Exception_Generic
Message
File generic.php
Line 33 -
Opening WP Toolkit results in the following error:
Server Error 500 Zend_Db_Adapter_Exception
Type Zend_Db_Adapter_Exception
Message SQLSTATE[HY000] [2002]
No such file or directory
File Abstract.php Line 144 -
Plesk upgrade fails with the following error:
DATABASE ERROR!!!
Database psa database found, but version undefined -
A table cannot be properly queried with the
SELECT
statement:select * from db_example.misc;
ERROR 1033 (HY000): Incorrect information in file: './db_example/misc.frm'
Cause
InnoDB corruption.
Most InnoDB corruptions are hardware-related. Corrupted page writes can be caused by power failures or bad memory. The issue also can be caused by using network-attached storage (NAS) and allocating InnoDB databases on it.
Resolution
Solution via Plesk GUI
Manual SSH solution
Note: The solution below is available starting from Plesk 18.0.63 version. If Plesk version is below 18.0.63 check the Manual SSH solution subsection
- Open the Plesk Repair Kit by accessing the following URL:
https://203.0.13.2:8443/repair
Note: in the link above replace the 203.0.13.2 with the IP address/hostname of your Plesk server
- Input your Plesk admin credentials in the corresponding Username and Password fields and press the Sign in button.
- Under the MariaDB/MySQL server section press the Check and after the Continue button:
- When the checking procedure will be finished press the Repair button.
- Verify that the server has enough disk space for creating a backup for databases and press the Continue button to start the InnoDB repair procedure.
Note: this procedure could cause data loss because the corrupted databases will be removed:
Note: The location of the log file for this procedure is
/var/log/plesk/repairkit.log
The backup of the…