Cannot upgrade Plesk: Can't create table psa.aps_application_resource (errno: 150)

Created:

2016-11-16 12:55:50 UTC

Modified:

2017-08-16 17:30:40 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot upgrade Plesk: Can't create table psa.aps_application_resource (errno: 150)

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux

Symptoms

  1. Plesk upgrade is failing with an error:

    ERROR while trying to upgrade APSC SQL database from 11.1.0
  2. Cannot apply a solution for the error above:

    ERROR 1005 (HY000): Can't create table 'psa.aps_application_resource' (errno: 150)

Cause

A majority of tables are missing from APSC database:

mysql> show tables;
+-----------------------------+
| Tables_in_apsc |
+-----------------------------+
| aps_package_series |
| aps_registry_object |
| aps_registry_object_setting |
| aps_registry_object_tag |
| aps_resource |
| aps_resource_requirement |
| aps_settings_sequenses |
| meta_info |
+-----------------------------+
8 rows in set (0.00 sec)

Resolution

  1. Back up APSC database:

    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` apsc > /root/db_apsc_bkp.sql
  2. Restore APSC database from pre-upgrade dump like in example below:

    # cp /var/lib/psa/mysql.preupgrade.apsc.11.0.9-12.5.30.20160425-152920.dump.gz /root/mysql.preupgrade.apsc.11.0.9-12.5.30.20160425-152920.dump.gz

    # gunzip /root/mysql.preupgrade.apsc.11.0.9-12.5.30.20160425-152920.dump.gz

    # mysql -uadmin -p`cat /etc/psa/.psa.shadow` apsc < mysql.preupgrade.apsc.11.0.9-12.5.30.20160425-152920.dump
Have more questions? Submit a request
Please sign in to leave a comment.