Using Plesk to setup MySQL

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)

cdub

Posted 2012-01-20T09:27:16.560

Reputation: 215

Answers

0

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

mysql -u root -p

Karlson

Posted 2012-01-20T09:27:16.560

Reputation: 2 163

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.

user56reinstatemonica8

Posted 2012-01-20T09:27:16.560

Reputation: 3 946