In earlier versions of Plesk, the admin password was stored as clear-text in a file in /etc/psa. They finally fixed that hole, and the password is stored encrypted. This is a very good thing. In any scripts (like database backup scripts) that need to use that password for access to mysql, where in the old days you would have:
`cat /etc/psa/.psa.shadow`
You now can replace that with:
`/usr/local/psa/bin/admin --show-password`
Fine, this all sounds good. However I've run into a strange issue: the admin password stored
by the system and revealed through this command doesn't work with mysql directly.
Example:
% /usr/local/psa/bin/admin --show-password
<mypassword>
% mysql -uadmin -p
Enter password: <mypassword>
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
This is very annoying, since this breaks my backup scripts, and one needs occassionally to do admin type work in Mysql. Anyone know how to access Mysql in the new password system?
`cat /etc/psa/.psa.shadow`
You now can replace that with:
`/usr/local/psa/bin/admin --show-password`
Fine, this all sounds good. However I've run into a strange issue: the admin password stored
by the system and revealed through this command doesn't work with mysql directly.
Example:
% /usr/local/psa/bin/admin --show-password
<mypassword>
% mysql -uadmin -p
Enter password: <mypassword>
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
This is very annoying, since this breaks my backup scripts, and one needs occassionally to do admin type work in Mysql. Anyone know how to access Mysql in the new password system?