Symptoms
Plesk login page shows one of the following error:
-
ERROR: PleskMainDBException
DB query failed: Unknown error -
ERROR: Exception: Unable to get administrator password: Can't decrypt data
-
ERROR: Exception: Unable to get administrator password: The system cannot find the file specified. (Error code 2)
Cause
Plesk administrator password in the Windows registry and/or Plesk SQL Server administrator password in the mysql database are corrupted/incorrect.
Resolution
Automatic Solution (Recommended)
-
Download the PowerShell script to a Windows server.
-
Unzip the file.
-
Right-click on the file "plesk178-admin-pass-reset.ps1" and click "Run with PowerShell" to run the script.
Manual Solution
-
Create the psa_root user with a random password to perform further operations. Normally, this step is not necessary, since it is supposed to be executed during Plesk installation:
C:> plesk sbin mysqlmng_adm --inject-root
-
Remove existing admin user from Plesk SQL:
C:> plesk sbin mysqlmng_adm --del-user --user-login=admin
-
Create new admin user with random password:
C:> plesk sbin mysqlmng_adm --add-super-user --login=admin --password=new_password --allowed-host=localhost
C:> plesk sbin psadb -u --password=new_password
Note: in the commands above replace new_password with the required password