Applicable to:
- Plesk Onyx for Linux
Symptoms
-
Plesk Onyx is not accessible with the following error message in a browser:
PLESK_INFO: Internal error:
DB query failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'field list', query was: SELECT id, name, descr, enabled FROM actions
Message DB query failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'field list', query was: SELECT id, name, descr, enabled FROM actions
File Mysql.php
Line 53
Type Plesk\Exception\DatabaseOR
PLESK_INFO: Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'action_name' in 'field list', query was: insert into log_actions(`date`, `ip_address`, `user`, `action_nam e`, `object_id`)
OR
PLESK_INFO: Plesk upgrade failed: DB query failed: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'psa.ServiceInstances' does not exist, query was: DESCRIBE 'ServiceInstances'
File Mysql.php
Line 53
Type Plesk\Extensions\Database -
When running the command "plesk login" in a command-line interface, it returns the following error message:
# plesk login
[2018-05-21 20:34:16] ERR [panel] DB query failed: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'psa.ServiceInstallations' doesn't exist, query was: DESCRIBE `ServiceInstallations`
DB query failed: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'psa.ServiceInstallations' doesn't exist, query was: DESCRIBE `ServiceInstallations`OR
CONFIG_TEXT: Internal error:
DB query failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'field list', query was: SELECT id, name, descr, enabled FROM actions
Message DB query failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'field list', query was: SELECT id, name, descr, enabled FROM actions
File Mysql.php
Line 53
Type Plesk\Exception\Database -
The table
psa.ServiceInstallations
does not exist:# plesk db "select * from ServiceInstallations"
ERROR 1146 (42S02) at line 1: Table 'psa.ServiceInstallations' doesn't exist
exit status 1
Cause
The Plesk database was not converted successfully after an upgrade from previous release.
Resolution
Complete Plesk upgrade:
-
Connect to the Plesk server via SSH.
-
Start Plesk Installer as follows to complete upgrade:
# plesk installer update --repatch
-
Run the Plesk repair tool to fix Plesk database:
# plesk repair db
-
Access Plesk.
If the issue persists, restore the Plesk 'psa' database from a pre-upgrade dump. In this example, we are restoring the 'psa' database from a pre-upgrade dump created before an upgrade from Plesk 12.5:
-
Connect to the Plesk server via SSH.
-
Switch to the directory with daily dumps:
# cd /var/lib/psa/dumps
-
List all available pre-upgrade dumps:
# ls -l mysql.preupgrade*
-rw------- 1 root root 212341 Feb 1 05:18 mysql.preupgrade.12.5.30-12.5.30.20190214-051821.dump.gz
-rw------- 1 root root 213230 Feb 1 13:50 mysql.preupgrade.12.5.30-17.8.11.20190214-135000.dump.gz -
Restore the 'psa' database from a pre-upgrade dump:
# zcat mysql.preupgrade.12.5.30-12.5.30.20190214-051821.dump.gz | sed -n '/-- Current Database: `psa`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin
-
Upgrade MySQL databases:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin -T --debug-check mysql
-
Access Plesk.
Comments
1 comment
Both didn´t work for me. There are NO pre-upgrade dumps in the folder dumps.
[root@h2890615 /]# cd /var/lib/psa/dumps
[root@h2890615 dumps]# ls -l mysql.preupgrade*
ls: cannot access mysql.preupgrade*: No such file or directory
Please sign in to leave a comment.