Applicable to:
- Plesk for Linux
Symptoms
-
Unable to restore the
psa
database:# ERROR 1813 (HY000) at line 151: Tablespace for table 'psa.APSLicenses' exists. Please DISCARD the tablespace before IMPORT
-
Unable to create a dump of the
psa
database:# mysqldump: Got error: 1932: "Table 'psa.APSLicenses' doesn't exist in engine" when using LOCK TABLES
Cause
The psa
database is corrupted.
Resolution
-
Connect to the Plesk server via SSH.
-
Create a backup of the files stored in
/var/lib/mysql/psa
:# mkdir /root/varlibmysqlpsa/
# cp -a /var/lib/mysql/psa/* /root/varlibmysqlpsa
-
Remove the files:
# rm -rf /var/lib/mysql/psa/*
-
Remove the
psa
database:# plesk db "DROP DATABASE psa"
-
Connect to MySQL and create an empty
psa
database:# MYSQL_PWD=$(cat /etc/psa/.psa.shadow) mysql -uadmin
MYSQL_LIN: MariaDB [(none)]> create database psa;
Query OK, 1 row affected (0.002 sec)MYSQL_LIN: MariaDB [(none)]> quit
-
Restore the
psa
database from the latest daily backup:# cd /var/lib/psa/dumps
# zcat mysql.daily.dump.0.gz | sed -n '/-- Current Database: `psa`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin --default-character-set=utf8
Comments
2 comments
My Plesk is not working its getting HTPP error 500 please have a look on this because very important.

Plesk URL: https://70.35.197.226:8443/
Hi there Syed Tabrez
The error message which is shown in your Plesk is too general and the solution provided in this KB article may not cover it.
For troubleshooting, I'd recommend you to submit a request to Plesk Support (see https://support.plesk.com/hc/en-us/articles/213608509).
Please sign in to leave a comment.