• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved I can not access the Plesk Panel 12.5

defharo

New Pleskian
When I try to access Plesk Panel 12.5 in centos 6 receives the following message:
ERROR: PleskDBException: Unable to connect to database: mysql_connect(): Access denied for user 'admin'@'localhost' (using password: NO) (Error code: 1045) (Abstract.php:69)

Apparently, virtual host services of email, apache, ftp, etc. work properly
THx for help
 
Hello,

Please try this,

/usr/local/psa/bin/admin --show-password

Reset the password:
/usr/local/psa/bin/init_conf -u -passwd <new_password>

No please try the command "Plesk db" and check if you are able to access the database.

Also please check this command to see mysql is up. "netstat -ntlp | grep 3306"

Thank you,
 
Great. I'm now having the same problem. I tried following the instructions linked above but I can't restart MySQL at all. I changed the my.cnf to include the skip-grant-tables and I still can't login to mysql because:

# /etc/init.d/mysqld restart
-bash: /etc/init.d/mysqld: Datei oder Verzeichnis nicht gefunden [means: no such file or directory found]

Now what? Help!!!!
 
Also, for the other suggestion:

"
/usr/local/psa/bin/admin --show-password
Warning: Current locale is unusable. Using 'C' instead.
Unable to connect to database: (Error code: 1045)"

When I type in plesk db:

"
plesk db
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
exit status 1"
 
I FIXED IT! Holy mother of god I can't believe it. Found part of the answer of a CentOS 7 forum.

Follow these steps (some is the same as the normal documentation but there's a big difference too!):

1. run this line, copy the password to some text file:

cat /etc/psa/.psa.shadow

2. vi /etc/my.cnf
i for insert, under [mysqld] add the skip-grant-tables (or skip_grant_tables) option. esc :x! (to get out and save changes)

***3. restart mysql using this line:

systemctl restart mariadb.service

***IMPORTANT*** (and FYI Plesk team!!!) The Plesk 12.5 documentation for CentoOS7 users needs to be updated, because CentoOS7 is running MariaDB and the restart option has CHANGED from previous versions (at least that's what I understood from the CentOS7 forum messages I read)

4. Now you should be able to run the following line to see the incorrect password set up for admin:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"select * from user where User='admin';"

5. Reset it to the password you pasted, the correct one:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"update user set Password=PASSWORD('$AES-128-....==') where User='admin';"

6. Refresh browser to see you can now login again to Plesk.

Hope this helps some of you with this annoying problem!
 
The problem was solved by the excellent service Odin Support.
The solution:
I am glad to tell you that the issue has been fixed.

The root cause of the issue was in incorrect ownership on file /etc/psa/.psa.shadow and directory /etc/psa/private
It was set as root:root

I set correct ownership using commands below:
# chown psaadm:psaadm /etc/psa/.psa.shadow
# chown -R psaadm:root /etc/psa/private/

Next I have found that directory /etc/sw/keys has incorrect permissions. I have fixed them using the following commands:
# chown -R root:swkey-data /etc/sw/keys/
# chmod u+s /etc/sw/keys/restart/apskeyhandler /etc/sw/keys/restart/plesk-key-handler
# chmod 2770 /etc/sw/keys

After that I was able to access Plesk without any issues.
 
The proposed solution works perfectly .
But , why do I have to repeat those steps every day?
Is there any way to save them?

I FIXED IT! Holy mother of god I can't believe it. Found part of the answer of a CentOS 7 forum.

Follow these steps (some is the same as the normal documentation but there's a big difference too!):

1. run this line, copy the password to some text file:

cat /etc/psa/.psa.shadow

2. vi /etc/my.cnf
i for insert, under [mysqld] add the skip-grant-tables (or skip_grant_tables) option. esc :x! (to get out and save changes)

***3. restart mysql using this line:

systemctl restart mariadb.service

***IMPORTANT*** (and FYI Plesk team!!!) The Plesk 12.5 documentation for CentoOS7 users needs to be updated, because CentoOS7 is running MariaDB and the restart option has CHANGED from previous versions (at least that's what I understood from the CentOS7 forum messages I read)

4. Now you should be able to run the following line to see the incorrect password set up for admin:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"select * from user where User='admin';"

5. Reset it to the password you pasted, the correct one:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"update user set Password=PASSWORD('$AES-128-....==') where User='admin';"

6. Refresh browser to see you can now login again to Plesk.

Hope this helps some of you with this annoying problem!
 
I FIXED IT! Holy mother of god I can't believe it. Found part of the answer of a CentOS 7 forum.

Follow these steps (some is the same as the normal documentation but there's a big difference too!):

1. run this line, copy the password to some text file:

cat /etc/psa/.psa.shadow

2. vi /etc/my.cnf
i for insert, under [mysqld] add the skip-grant-tables (or skip_grant_tables) option. esc :x! (to get out and save changes)

***3. restart mysql using this line:

systemctl restart mariadb.service

***IMPORTANT*** (and FYI Plesk team!!!) The Plesk 12.5 documentation for CentoOS7 users needs to be updated, because CentoOS7 is running MariaDB and the restart option has CHANGED from previous versions (at least that's what I understood from the CentOS7 forum messages I read)

4. Now you should be able to run the following line to see the incorrect password set up for admin:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"select * from user where User='admin';"

5. Reset it to the password you pasted, the correct one:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"update user set Password=PASSWORD('$AES-128-....==') where User='admin';"

6. Refresh browser to see you can now login again to Plesk.

Hope this helps some of you with this annoying problem!
The proposed solution works perfectly .
But , why do I have to repeat those steps every day?
Is there any way to save them?

man, I want to write a song about you! Thanks so much for taking the time to post this. Worked like a charm!
 
I FIXED IT! Holy mother of god I can't believe it. Found part of the answer of a CentOS 7 forum.

Follow these steps (some is the same as the normal documentation but there's a big difference too!):

1. run this line, copy the password to some text file:

cat /etc/psa/.psa.shadow

2. vi /etc/my.cnf
i for insert, under [mysqld] add the skip-grant-tables (or skip_grant_tables) option. esc :x! (to get out and save changes)

***3. restart mysql using this line:

systemctl restart mariadb.service

***IMPORTANT*** (and FYI Plesk team!!!) The Plesk 12.5 documentation for CentoOS7 users needs to be updated, because CentoOS7 is running MariaDB and the restart option has CHANGED from previous versions (at least that's what I understood from the CentOS7 forum messages I read)

4. Now you should be able to run the following line to see the incorrect password set up for admin:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"select * from user where User='admin';"

5. Reset it to the password you pasted, the correct one:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"update user set Password=PASSWORD('$AES-128-....==') where User='admin';"

6. Refresh browser to see you can now login again to Plesk.

Hope this helps some of you with this annoying problem!

It works but is not a solution. I mean when you delete skip-grant-tables the problem is back again.
 
Hi aadriann,

this thread has already been solved. If you experience similar issues/problems, you should consider to describe YOUR issue/problem and pls. don't forget to provide informations which help to identify YOUR root cause ( log - entries, configuration files, operating system, current used Plesk version ( incl. MU ! ), etc.. the more informations you provide, the better will be the investigations and the corresponding suggestions and solutions to solve your issue.

Looking back in this thread, there is one root cause, which hasn't been mentioned and that is the situation, when an ADDITIONAL my.cnf - file has been stored ( mostly at /root/.my.cnf ), where the username ( root ) and password have been stored without encryption, which will be used in addition to "/etc/mysql/my.cnf" ( or "/etc/my.cnf" on CentOS/RHEL - based systems ). As you might know, first of all, there is no "root"- user in the "mysql" - database from your database - server, when you use Plesk; Plesk names the global root = "admin" - so the login will fail, because of the additional ".my.cnf" - file. Second, there is no password - encryption used, when passing over the clear - text password from the additional ".my.cnf" - file, which will fail as well, because your configuration expects the encrypted password and not the clear - text password, because the password isn't stored in clear - text in your "mysql" - database for the user "admin". Conclusion: Pls. look for possible additional ".my.cnf" - files on your server and delete them. Following the above suggestions to change the password for the user admin during the "skip-grant-tables" - process will certainly succeed and you shouldn't experience any issues at all, which might depend on false username - usage, or false password - usage. :) In any other case, pls. read again the suggestions in my first statement of this post. ;)
 
Back
Top