Plesk is accessible but error sometimes is shown: Access denied for user 'admin'@'localhost' (using password: YES)




  • Avatar

    Not working for me, destination server is still showing this error.


     Failed to copy content of database 'coupondig'
    Migration tools tried to perform operation in 3 attempts: Command execution failed on the source server 'source' ( with non-zero exit code.
    command: MYSQL_PWD="$(cat)" mysqldump --no-defaults -h localhost -P 3306 -uadmin --quick --quote-names --add-drop-table --default-character-set=utf8 --set-charset --routines coupondig > /root/plesk_migrator/plesk_migrator-twks464nc88wp9kvxljp749p2mppndcx/db-dumps/coupondig.sql
    exit code: 2
    stderr: mysqldump: Got error: 1045: "Access denied for user 'admin'@'localhost' (using password: YES)" when trying to connect

  • Avatar
    Lev Iurev

    Hi @iamkingsleyf this article is not related to your issue. This is a bug in Plesk Migrator Tool #PMT-3778 and will be fixed in future. In order to fix it perform the following actions on the source server:


    1. Create a backup of PSA database:

      # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa > psa`date +%F_%H.%M`.sql

    2. Open the database:

      # plesk db

    3. Update psa.DatabaseServers table admin_password for MySQL server localhost on the source server in the psa database:

      mysql> UPDATE DatabaseServers SET admin_password = '********' WHERE host = 'localhost' AND type = 'mysql'; 

    Note: Asterisks in admin_password it is directly asterisks, not another symbols.

  • Avatar

    Is this a password or i should just use it like that? ********

  • Avatar
    Lev Iurev

    @iamkingsleyf, it is just asterisks

  • Avatar

    I have removed mySQL and now plesk is not working. When i try to reinstall the plesk it gives me below error. What should I do to resolve this. 

    Trying to start service mysqld... mysqld is stopped
    Initializing MySQL database: [ OK ]
    Starting mysqld: [ OK ]
    Trying to establish test connection... ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
    ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
    ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)


  • Avatar
    Ivan Postnikov


    Could you share the additional information? From the provided output MySQL exists on the server and was successfully started.

    To resolve the issue from the output, use the following article.

Please sign in to leave a comment.

Have more questions? Submit a request