• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Error accessing Plesk Control Panel address Windows

O

OrionHat

Guest
When I try to acces https://mydomain:8443 I see error message below (this message appears before login screen not after I have typed credentials):

ERROR: PleskMainDBException
Access denied for user 'admin'@'localhost' (using password: NO)

0: common_func.php3:619
reconnect()
1: common_func.php3:582
db_connect()
2: auth.php3:146

I have found on this forum many workarounds, but all of them are for Linux.

This problems have appeared after a restart on Plesk Services. I had received a Failed error message while using migration manager, tried to exclude the log on migration manager with no success either. So I tried to restart Plesk Services.

I cannot connect to Plesk Database through localhost, using password or not.

Service starts correctly, no error is shown on .err file now.

Does anyone has a solution to this problem?
 
After doing some googling I found the following answer

1. SSH into your server
2. Type cd to MySQL bin folder (\usr\local\mysql\bin)
3. \.mysql
4. type the following

Code: Select all
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;



you should now be able to log on, in this i am assuming that your password is still the default of admin
 
Thanks, but I had already tried it. I have also tried to execute it calling this SQL from my.ini but it does not work. I saw no error message, as the command had been succesfuly executed, but when I try to log on to mysql using the root password I receiveerror message telling root cannot login on localhost.

Admin password is not default anymore. I had changed it many times in the past.
 
Solution

Here is a solution for Windows users.

1. I edited my.ini files from MySQL database (Remember, you have a MySQL for Plesk and a MySQL for your hosting accounts. The folder should be something like \Parallels\Plesk\MySQL\Data\my.ini) and added the folowing lines:

[mysqld]
skip-grant-tables

2. I restarted Plesk SQL Server service.

3. I opened a CMD, went to Bin MySQL folder, something like Paralles\Plesk\MySQL\bin, and typed:

mysql --defaults-file="C:\Program Files (x86)\\Parallels\\Plesk\\MySQL\\Data\\My.ini"

The path in the --defaults-file is the path where is located the my.ini file you edit on step 1. If you just type mysql without the --defaults-file this procedure may not work.

4. So I typed:

update mysql.user set password = '' where user = 'admin';

5. Try logging in to Plesk now.

6. If it works Ok, don't forget to erase lines added on step 1 to My.ini and restart Plesk SQL Server service.
 
Back
Top