• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Suddenly can't get access to mysql via command line

SacAutos

Regular Pleskian
I'm rather perplexed. This morning I went to use mysql via the command line while logged in as root (CentOS 5.6 with Plesk 10.4.4 and all the updates):

[root@vserver ~]# mysql -uadmin -p
Enter password:
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
[root@server ~]#

and I was denied. I haven't changed any passwords in months. And I have the correct admin password. Admittedly I haven't tried using mysql at the command line in a while either. Any ideas what I can do to get this working again or what I can check?
 
Hi,

Don't use the admin password, use the contents of /etc/psa/.psa.shadow :

mysql -u admin -p$(cat /etc/psa/.psa.shadow)

In Plesk 10.something the /etc/psa/.psa.shadow became encrypted, but so as not to break script compatibility (all of our scripts that need it cat that file for db access) Parallels simply made the mysql admin password the encrypted version of the Plesk admin password. Clear as mud eh?

Paul
 
Perfect!

That was exactly what I needed. I'm back in business. Thank you for that useful tip!
 
Back
Top