Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)

share|improve this question
add comment

2 Answers

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.
share|improve this answer
add comment

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

mysql -u root -p
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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