Question
It is not possible to log in to MySQL using a Plesk MySQL "admin" password in plain text:
# mysql -uadmin -p"mysql_admin_password_in_plain" psa
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
while login with cat
works fine:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa
How to log in to MySQL using a Plesk MySQL "admin" password in plain text?
Answer
For security reasons, the Plesk MySQL "admin" password is encrypted and stored in the file /etc/psa/.psa.shadow
.
To log in to MySQL using the Plesk MySQL "admin" password without cat
, use the encrypted string from the file /etc/psa/.psa.shadow
:
Note: Put the backslash symbol "\" before the sign "$":
# mysql -uadmin -p"\$AES-128-CBC\$NP15ZIjr/iNnfjQ72gR8yA==\$uil2bGcV83uxvFihBxkSvA==" psa
To connect from the MySQL Workbench use the plain text from the /etc/psa/.psa.shadow.