skip to Main Content

The Scenario

I keep trying to log into my Plesk MySql database called psa using the following command:

mysql psa -uadmin -ppassword*!

( This command of course assumes my password is password*! ). But I keep getting the following error:

ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)

So I used the following command to check if the password was correct..

/usr/local/psa/bin/admin --show-password

It showed the password that I have been using. So now I have confirmed that my password is correct, but for some reason it is just not accepting it.

I then decided to try to log in using the hashed password because maybe that would make a difference…

mysql psa -uadmin -p`cat /etc/psa/.psa.shadow`

…and it actually worked.


The problem

Unfortunately, I am trying to delegate access to someone else and I can’t just give them a giant hash to use as a password.

Why would it let me log in using the hash but not the correctly specified password?


Important info

My password actually does end in an exclamation point, and after further investigation, I realized this might cause some issues. So I also tried to wrap the command in single quotes like this:

mysql psa -uadmin '-ppassword*!'

But that gave me the same error as before.

2

Answers


  1. Just create separate MySQL user with proper permissions, like

    CREATE USER 'admin2'@'localhost' IDENTIFIED BY 'properPass';
    GRANT ALL ON *.* TO 'admin2'@'localhost'; 
    

    if you need new admin.

    Login or Signup to reply.
  2. Plesk 10+ uses encrypted password for internal use.
    This is called Ehanced Security Mode (more info @ http://download1.parallels.com/Plesk/PP11/11.5/Doc/en-US/online/plesk-administrator-guide/71227.htm# ).

    The hash is actually the password used in the mysql.users table.

    You cannot change this, as this would break Plesk.
    You can also not revert Enhanced Security Mode.

    The only option is to add another superuser yourself.
    Although I generally advise against doing so.

    The hash is the true password.
    If you need to have remote access to your databases, you also need to update the Host for admin user.
    But again, I can only advise against this as this does not meet Plesk logic.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search