How to log in to MySQL using the Plesk MySQL "admin" password in plain text?

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.

  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

Connecting using PuTTY on Windows workstations

Configuring PuTTY In PuTTY, under Session, enter your Host Name Under Connection choose Data...

How to install the php-mcrypt module on a Plesk server

Question How to install the php-mcrypt module on a Plesk server? Answer Notes: The solution in...

Windows: Accessing Your Server with Remote Desktop

This article explains how to use Remote Desktop to access your Windows server’s desktop from...

What is Reverse DNS?

Reverse DNS (rDNS) is name resolution that looks up an IP addresses to obtain a domain name,...

What is Reverse DNS?

Reverse DNS (rDNS) is name resolution that looks up an IP addresses to obtain a domain name,...