0

Having trouble getting my mysql up and running on a new virtual server. The host gave me Plesk and I think MySQL is installed but I can't seem to access it.

I keep getting this:

 mysql -u admin -p
Enter password:
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)

How do I make sure its running properly? How do I reset the root password? (I have root access to the server)

2 Answers 2

0

If you want admin access to the MySQL you need to do:

mysql -u root -p
0

Karlson's right in the sane world outside of Plesk... in Plesk by default mysql root is renamed to admin.

It's supposed to sync passwords with your admin password, but life is never that simple. Try:

mysql -uadmin -p `cat /etc/psa/.psa.shadow`

(a cheat's way of logging in, the .psa.shadow bit gets whatever the mysql password is and uses it. Go security!)

If that gives you a 1045 error, go down to the bit about that on this page. If it works and logs you in...

  • You can find the Plesk mysql password which it used, unencypted, by opening that /etc/psa/.psa.shadow file.
  • You can see your Plesk admin password unencrypted on screen with /usr/local/psa/bin/admin --show-password (go security!). In theory my understanding is that the two passwords should be the same... getting them to actually sync is a separate issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.