Cannot update admin password (db)

S

subtype

Guest
My database has the user 'admin' and a default password, which I have no idea what it is. I tried to change the database admin password by following the instructions in the PLESK help file, using the sql command:

mysql> SET PASSWORD for admin = PASSWORD('newpassword');

but I get the the error:

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql> SET PASSWORD for admin = PASSWORD('717Godspeed7')' at line 1

What's the deal?


Also, I have to go to DataBase Servers > DbWebAdmin to get to my database, and it is there, but how come it says zero dataabses under all of my domains? How do i add it to a domain?
 
If you haven't changed it, the unencrypted password can usually be found in /etc/psa/.psa.shadow

I sometimes use this command to connect to mysql without knowing the password:
Code:
$ mysql -u admin -p`cat /etc/psa/.psa.shadow`
 
Yes, the MySQL admin password is the same as the Plesk admin password. Changing your Plesk admin password also changes your MySQL admin password. /etc/psa/.psa.shadow contains this password, so the above command should always work when you want to connect to MySQL.

Also, your MySQL statement is indeed invalid. But you don't want to go and change the password directly through MySQL as it will probably break Plesk in numerous ways.
 
mysql from cmd line

I'm wondering why your command
mysql -uadmin -p`cat /etc/psa/.psa.shadow`
seems to work fine for me but when I issue the same command but replace what is in the shadow file it does not:
mysql -uadmin -pxyz123

Any ideas?
 
Back
Top