Question
-
How to connect to a MySQL server on Linux using a MySQL admin password in plain text?
- How to get MySQL admin password in plain text?
Answer
For security reasons, MySQL admin password is encrypted and stored in the file /etc/psa/.psa.shadow
on a Plesk for Linux server.
To connect to a MySQL server using the MySQL admin password in plain text, use the encrypted string from the file /etc/psa/.psa.shadow
:
-
Connect to a Plesk server via SSH.
-
Print the content of
/etc/psa/.psa.shadow
:# cat /etc/psa/.psa.shadow
$AES-128-CBC$ZmY/EEpy1+TwCNq5kalqSA==$Pd02kf4TTlpXdi/qyeo92w== -
Use the string from the command above as an admin password when connecting using database management tools (MySQL Workbench, HeidiSQL, etc.).
Note: When connecting to MySQL server using a plain admin password from a Linux shell, be sure to put single quotes on the sides of the password:
# mysql -uadmin -p‘$AES-128-CBC$ZmY/EEpy1+TwCNq5kalqSA==$Pd02kf4TTlpXdi/qyeo92w==‘