Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

mysql -u root -p
share|improve this answer

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .