Symptoms
-
Plesk and plesk databaseÂ
psa
 are not accessible with the error:PLESK_INFO: ERROR 1045 (28000): Access denied for user ‘username‘@’localhost’ (using password: YES)
-
There are the following customizations in the Windows registry keyÂ
HKEY_LOCAL_MACHINESOFTWAREWow6432NodePLESKPSA ConfigConfig
-
MySQL_DB_PORT
 is set to 3306 instead of default 8306; -
PLESK_DATABASE_LOGIN
 was changed from the defaultÂadmin
 tousername
.
-
Cause
Plesk database login password stored in the Windows registry does not match with custom Plesk database user username
 stored in the Plesk SQL server database.
Resolution
-
Connect to the server via RDP;
-
Edit the fileÂ
%plesk_dir%DatabasesMySQLmy.ini
 addÂskip-grant-tables
 directive to the [MySQL] section; -
Restart the PleskSQLService service in Start > Services;
-
Log in to MySQL server on port 3306. According to the customizations it should be possible via the command in CMD:
C:> plesk db
-
Update the password (
authentication_string
 for MySQL 5.7) for the user from the error and from the registry recordÂPLESK_DATABASE_LOGIN
username
 in mysql database:MYSQL_LIN: UPDATE mysql.user SET authentication_string=PASSWORD(“password”) WHERE user=’username’;
-
Set the same password for Plesk db user via the command in CMD:
C:> plesk sbin psadb -u –password=”password”
-
Remove theÂ
skip-grand-tables
 directive fromÂ%plesk_dir%DatabasesMySQLmy.ini
; -
Restart the PleskSQLService service in Start > Services.
Additional Information
ERROR PleskMainDBException Access denied for user ‘admin’@’localhost’ (using password: YES)