Applicable to:
- Plesk for Windows
Symptoms
Plesk login page shows one of the following error:
-
PLESK_INFO: ERROR: PleskMainDBException
DB query failed: Unknown error -
PLESK_INFO: ERROR: Exception: Unable to get administrator password: Can't decrypt data
-
PLESK_INFO: ERROR: Exception: Unable to get administrator password: The system cannot find the file specified. (Error code 2)
-
CONFIG_TEXT: ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [1045] Access denied for user 'admin'@'localhost' (using password: YES)
Cause
Plesk administrator password in the Windows registry and/or Plesk SQL Server administrator password in the mysql database are corrupted/incorrect.
Resolution
-
Plesk 17.8 and Plesk Obsidian
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=%ADMIN_PASS% --allowed-host=localhost
-
Update admin's password in Windows registry:
C:\> plesk sbin psadb -u --password=%ADMIN_PASS%
-
-
Plesk 17.5 and older
Solution IFirst, reset Plesk administrator password in the Windows registry, then Plesk SQL Server administrator password in the mysql database
-
Add the line "skip-grant-tables" under the [PleskSQLServer] section in the file
%plesk_dir%mysql\my.ini
(or%plesk_dir%mysql\data\my.ini
). -
Start a command prompt as an Administrator and run the command below to restart the Plesk SQL Server service:
C:\> net stop plesksqlserver && net start plesksqlserver
-
Set new password for Plesk administrator in the Windows registry:
C:\> "%plesk_bin%\plesksrvclient.exe" -set NEW_PASSWORD
-
Set new password for Plesk SQL Server administrator in the mysql database:
C:\> "%plesk_bin%\plesksrvclient.exe" -set NEW_PASSWORD true
The command above will reset both passwords - in the Windows registry and in the mysql database, but it will not work if password in the registry is still corrupted.
-
Remove the line "skip-grant-tables" from
%plesk_dir%mysql\my.ini
(or%plesk_dir%mysql\data\my.ini
). -
Restart the Plesk SQL Server service.
Solution IIFirst, reset Plesk SQL Server administrator password in the mysql database, then Plesk administrator password in the Windows registry
-
Add the line "skip-grant-tables" under the [PleskSQLServer] section in the file
%plesk_dir%mysql\my.ini
(or%plesk_dir%mysql\data\my.ini
). -
Start a command prompt as an Administrator and run the command below to restart the Plesk SQL Server service:
-
Find a username of the Plesk SQL Server administrator in the PLESK_DATABASE_LOGIN value in the Windows registry:
C:\> reg query "HKLM\SOFTWARE\Wow6432Node\Plesk\PSA Config\Config" /v PLESK_DATABASE_LOGIN
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Plesk\PSA Config\Config
PLESK_DATABASE_LOGIN REG_SZ adminBy default it is set to admin.
-
Log in to the mysql database on the port 8306:
C:\> "%plesk_dir%\MySQL\bin\mysql.exe" -P8306 -Dmysql
-
Update the password of the Plesk SQL administrator (replace NEW_PASSWORD and admin with proper values):
C:\> UPDATE user SET Password = password('NEW_PASSWORD') WHERE User = 'admin';
-
Remove the line "skip-grant-tables" from
%plesk_dir%mysql\my.ini
(or%plesk_dir%mysql\data\my.ini
). -
Restart the Plesk SQL Server service.
-
Set the same password as on step 5 for the Plesk administrator in the Windows registry:
C:\> "%plesk_bin%\plesksrvclient.exe" -set NEW_PASSWORD
OR:
C:\> "%plesk_cli%\init_conf.exe" --set-admin-password -passwd NEW_PASSWORD
OR:
C:\> "%plesk_cli%\admin.exe" --set-password -passwd NEW_PASSWORD
-
Comments
1 comment
Same problem here ERROR: PleskMainDBException
DB query failed: Unknown error
https://kitchenfa.com/best-touchless-kitchen-faucet/
Please sign in to leave a comment.