Plesk shows: Unknown database 'apsc'

Created:

2016-11-16 13:05:15 UTC

Modified:

2017-08-16 16:10:21 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Plesk shows: Unknown database 'apsc'

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux
  • Plesk Onyx 17.5 for Linux

Symptoms

Plesk is showing the following error:

    New files of configuration for Apache web server were not built due to errors in configuration templates: 
Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = [unixODBC][MySQL][ODBC 3.51 Driver]Unknown database 'apsc'.

OR

Migration fails with the following error:

    An error occurred during importing package: ODBC error #HY000: [unixODBC][MySQL][ODBC 5.1 Driver]Access denied for user 'psaadm'@'localhost' (using password: NO)

Cause

APS Controller database apsc does not exist on the server.

Resolution

There are 3 ways to restore apsc database:

  1. Find apsc database backup and restore it as described in the article #213904125

    # ll /var/lib/psa/dumps/ | grep apsc
    -rw------- 1 root root 27145 Dec 6 01:42 mysql.preupgrade.apsc.11.5.30-11.5.30.20131206-014221.dump.gz
    -rw------- 1 root root 3050 Dec 6 01:42 mysql.preupgrade.apsc.11.5.30-11.5.30.20131206-014244.dump.gz
    -rw------- 1 root root 2990 Dec 19 06:14 mysql.preupgrade.apsc.11.5.30-11.5.30.20131219-061440.dump.gz

    # gunzip /var/lib/psa/dumps/mysql.preupgrade.apsc.11.5.30-11.5.30.20131206-014221.dump.gz

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -f -uadmin apsc < /var/lib/psa/dumps/mysql.preupgrade.apsc.11.5.30-11.5.30.20131206-014221.dump
  2. If there are no backups of 'apsc' database found, try to repair database with bootstrapper.sh script:
    For Plesk 11.5:

    # /usr/local/psa/bootstrapper/pp11.5.30-bootstrapper/bootstrapper.sh repair

    For Plesk 12:

    # /usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair

    For Plesk 12.5:

    # /usr/local/psa/bootstrapper/pp12.5.30-bootstrapper/bootstrapper.sh repair

    For Plesk Onyx:

    # /usr/local/psa/bootstrapper/pp17.0.17-bootstrapper/bootstrapper.sh repair

    For Plesk Onyx 17.5:

    # /usr/local/psa/bootstrapper/pp17.5.3-bootstrapper/bootstrapper.sh repair
  3. If neither of above methods worked, create an empty apsc database and register it in Plesk using secure password:

    #  MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin -e"CREATE DATABASE apsc"

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin apsc < /usr/local/psa/bootstrapper/pp12.5.30-bootstrapper/db/apsc_mysql_db.sql

    # /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/scripts/register_apsc_database.php --register -host localhost -port 3306 -database apsc -login apsc -password "****"
Have more questions? Submit a request
Please sign in to leave a comment.