Plesk

Plesk is not available: Unknown database ‘apsc’

Symptoms

Cause

APS Controller database apsc does not exist on the server.

Resolution

There are 3 ways to restore apsc database:

Solution #1

Find the latest apsc database backup and restore it as described in the article here. For example:

  1. Find the latest backup:

    # ls -lt /var/lib/psa/dumps/ | grep apsc | head -1
    -rw------- 1 root root 4118 Mar 6 02:02 mysql.preupgrade.apsc.17.8.11-17.8.11.20181210-052236.dump.gz

  2. Unpack the archive with the backup:

    # gunzip /var/lib/psa/dumps/mysql.preupgrade.apsc.17.8.11-17.8.11.20181210-052236.dump.gz

  3. Restore the database from the backup:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -f -uadmin apsc < /var/lib/psa/dumps/mysql.preupgrade.apsc.17.8.11-17.8.11.20181210-052236.dump

Solution #2

If there are no backups of the database found in /var/lib/psa/dumps/, repair database with bootstrapper.sh script:

# /usr/local/psa/bootstrapper/ppXX.X.XX-bootstrapper/bootstrapper.sh repair

Note: Change XX.X.XX to comply with the current Plesk version installed.

Solution #3

In case the above solution does not work, create an empty apsc database and register it in Plesk using secure password:

  1. Create the database:

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

  2. Upload the default data from scheme:

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

    Note: Change XX.X.XX to comply with the current Plesk version installed.

  3. Register the database:

    # /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 "****"

 

 

Exit mobile version