Articles in this section

Unable to access Plesk: Unknown database 'psa'

Plesk for Windows Plesk for Linux kb: technical ABT: Group B

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Symptoms

Plesk is not accessible with the following error messages in a web-browser:

PLESK_INFO: Unknown database 'psa'

Cause

The Plesk system database psa is missing.

Resolution

Restore the psa database from a daily dump:

Plesk on Linux
  1. Connect to the Plesk server via SSH.
  2. Switch to the directory with daily dumps:

    # cd /var/lib/psa/dumps

  3. Find the most recent dump that contains the psa database:

    # zgrep "Current Database:" mysql.daily* | grep psa
    mysql.daily.dump.0.gz:-- Current Database: `psa`
    mysql.daily.dump.1.gz:-- Current Database: `psa`
    mysql.daily.dump.2.gz:-- Current Database: `psa`
    mysql.daily.dump.3.gz:-- Current Database: `psa`
    ...

    • where mysql.daily.dump.0.gz is the most recent daily dump.
  4. Restore the psa database from the most recent daily dump. In this example, the psa database is restored from mysql.daily.dump.0.gz:

    # zcat mysql.daily.dump.0.gz | sed -n '/-- Current Database: `psa`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin

Plesk on Windows Server
  1. Connect to the Plesk server via RDP.
  2. Start a command prompt as an Administrator.
  3. Connect to MySQL:

    Note: MySQL admin password is required for this operation. In Plesk Onyx 17.8 and later, retrieve the password with the command plesk sbin psadb --get-admin-password.

    C:\> "%plesk_dir%\Mysql\bin\mysql.exe" apsc -uadmin -p -P8306

  4. Once connected, create a new database with the name psa:

    MYSQL_WIN: mysql> create database psa;

  5. Exit MySQL:

    MYSQL_WIN: mysql> quit

  6. Switch to the directory with daily dumps:

    C:\> cd %plesk_dir%Mysql\Backup

  7. List a name of a Plesk dump with the psa database:

    C:\> dir psa*
    ...
    Directory of C:\Program Files (x86)\Plesk\MySQL\Backup

    03/27/2019 08:33 PM 468,888 psa-20181018020721.sql

  8. Restore the psa database using the dump file name from the previous step:

    Note: MySQL admin password is required for this operation.

    C:\> "%plesk_dir%"\Mysql\bin\mysql.exe -uadmin -p -P8306 psa < psa-20181018020721.sql

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.