Articles in this section

Plesk Email Security extension installation fails: SQLSTATE[HY000] [1045] Access denied for user 'es_jdoe'@'localhost'

Plesk for Linux kb: technical ext: pes

Applicable to:

  • Plesk for Linux

Symptoms

  • Installation of the Plesk Email Security extension for Plesk fails with an error that is similar to the following:

    PLESK_ERROR: Email Security extension installation failed: SQLSTATE[HY000] [1045] Access denied for user 'es_jdoe'@'localhost' (using password: YES)

Cause

The database user that the Plesk Email Security extension doesn't exist in the MySQL instance.

Resolution

  1. Connect to the server via SSH
  2. Enter the MySQL/MariaDB database server CLI:

    # plesk db

  3. Execute the following query in order to receive the details for the user from the error message:

    MYSQL_LIN: SELECT value FROM ModuleSettings ms
    JOIN Modules m
    WHERE m.id=ms.module_id
    AND m.name='email-security'
    AND ms.name in ('dbUser','dbPass');

  4. Recreate the database user that is missing while using the information that was obtained in the previous step by executing commands such as the following:
     

    Note: Replace es_jdoe with the name of the user in your case and XXXXXXXXXXXXXXXXXXXX with the password of the user that you receive from the previous step

     

    MYSQL_LIN: CREATE USER 'es_jdoe'@'localhost' IDENTIFIED BY 'XXXXXXXXXXXXXXXXXXXX'; 
    GRANT SELECT, INSERT, UPDATE, DELETE on emailsecurity.* to 'es_jdoe'@'localhost' WITH GRANT OPTION;

After this has been done, you may attempt to reinstall the Plesk Email Security extension once again.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.