Symptoms
-
When logging in to Plesk interface, the following error is shown:
PLESK_ERROR: DB query failed: (1030) SQLSTATE[HY000]: General error: 1030 Got error 194 "Tablespace is missing for a table" from storage engine InnoDB, query was: DESCRIBE `log_actions`
Note: Table name (
log_actionsin this example) may vary. -
When repairing the Plesk database or creating a dump dump, the operation fails with one of the following messages:
CONFIG_TEXT: Table 'psa.smb_componentUpdates' doesn't exist in engine
CONFIG_TEXT: Table 'psa.smb_productUpgrades' doesn't exist in engine
CONFIG_TEXT: mariadb-dump: Got error: 1030: "Got error 194 "Tablespace is missing for a table" from storage engine InnoDB" when using LOCK TABLES
Cause
Tables are corrupted in the Plesk 'psa' database.
Resolution
Solution I: Restore the corrupted tables manually
- Connect to your Plesk server via SSH.
-
Restore the tables from the latest available Plesk daily dump:
Note: Replace
log_actionswith the table name from the error message.# zcat /var/lib/psa/dumps/mysql.daily.dump.0.gz | sed -n '/-- Table structure for table `log_actions`/,/-- Table*/p' | plesk db
Solution II: If there are a lot of broken tables, restore the whole psa database
- Connect to your Plesk server via SSH.
-
Switch to the directory with daily dumps:
# cd /var/lib/psa/dumps
-
Find the most recent dump that contains the
psadatabase:# zgrep "Current Database:" mysql.daily* | grep psa
mysql.daily.dump.0.gz:-- Current Database: `psa`
mysql.daily.dump.1.gz:-- Current Database: `psa`
mysql.daily.dump.2.gz:-- Current Database: `psa`
mysql.daily.dump.3.gz:-- Current Database: `psa`
...- where
mysql.daily.dump.0.gzis the most recent daily dump.
- where
-
Restore the
psadatabase from the most recent daily dump. In this example, thepsadatabase is restored frommysql.daily.dump.0.gz:# zcat mysql.daily.dump.0.gz | sed -n '/-- Current Database: `psa`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin
- Connect to your Plesk server via RDP.
- Start a command prompt as an Administrator.
-
Connect to MySQL:
Note: MySQL admin password is required for this operation. In Plesk Onyx 17.8 and later, retrieve the password with the command
plesk sbin psadb --get-admin-password.C:\> "%plesk_dir%\Mysql\bin\mysql.exe" apsc -uadmin -p -P8306
-
Once connected, create a new database with the name
psa:MYSQL_WIN: mysql> create database psa;
-
Exit MySQL:
MYSQL_WIN: mysql> quit
-
Switch to the directory with daily dumps:
C:\> cd %plesk_dir%Mysql\Backup
-
List a name of a Plesk dump with the
psadatabase:C:\> dir psa*
...
Directory of C:\Program Files (x86)\Plesk\MySQL\Backup
03/27/2019 08:33 PM 468,888 psa-20181018020721.sql -
Restore the
psadatabase using the dump file name from the previous step:Note: MySQL admin password is required for this operation.
C:\> "%plesk_dir%"\Mysql\bin\mysql.exe -uadmin -p -P8306 psa < psa-20181018020721.sql
Comments
Please sign in to leave a comment.