Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Plesk on Amazon Web Services (AWS)
      • Plesk on Amazon Web Services (AWS)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Plesk on Amazon Web Services (AWS)
      • Plesk on Amazon Web Services (AWS)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Plesk upgrade/installation/migration fails: Access denied for user ‘admin’@’localhost’

 
backupdatabasedebianhordeinstallation upgrade

Symptoms

  • Plesk upgrade or installation fails with one of the following errors in /tmp/autoinstaller3.log :

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

    Access denied for user 'horde'@'localhost' (using password: YES)

    Access denied for user 'pp_sb_db'@'localhost' (using password: yes)

    EMERGENCY: The file /root/.my.cnf contains a password for the MySQL console client. Please remove this file temporarily and restore it after the upgrade, otherwise the upgrade will fail.

    Note: this may also appear as a warning during the pre upgrade checker:
    Screenshot_2020-01-31_at_00.55.48.png

  • Migration fails with the following error:

    Error:
    Failed to generate migration list file
    Cause: Command execution failed on the local server with non-zero exit code.
    command: MYSQL_PWD="$(cat /etc/psa/.psa.shadow)" mysql --silent --skip-column-names -u admin psa -e 'SHOW VARIABLES LIKE '"'"'socket'"'"''
    exit code: 1
    stdout:
    stderr: ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)

  • Attempt to connect to Plesk database fails:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa
    ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)

  • There is a /root/.my.cnf or /etc/mysql/conf.d/client-mariadb.cnf or /etc/mysql/debian.cnf file on the server containing invalid credentials:

    # cat /root/.my.cnf
    [client]
    user=root
    password=mypassword

Cause

Invalid MySQL credentials. Additional MySQL configuration files are included.

Resolution

  1. Log in to the server over SSH

  2. Make sure there are no additional MySQL configuration files like /root/.my.cnf with MySQL password. If it exists, rename it:

    # mv /root/.my.cnf /root/.my.cnf.backup

    Note: MySQL reads startup options (including credentials, if defined) from the following files, in the below order:

    /etc/my.cnf
    /etc/mysql/my.cnf
    SYSCONFDIR/my.cnf
    $MYSQL_HOME/my.cnf
    defaults-extra-file (The file specified with --defaults-extra-file=path, if any)
    ~/.my.cnf

  3. Additionally, if problem persists, check If there is an !include directive make sure it does not refer to invalid credentials.

    Note: Since MySQL 5.0.4, it is possible to use !include directives in option files to include other option files and !includedir to search specific directories for option files. For example, to include the /home/mydir/myopt.cnf file use the following directive:

    !include /home/mydir/myopt.cnf

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

You Are Always Safe When You Have an Up-To-Date Plesk Backup

Read More »

Plesk with Centralized Database and Network File System

Read More »

Recommended OSs for Plesk

Read More »
Knowledge Base

How to reinstall phpMyAdmin in Plesk for Linux

Read More »

Messages about failed logrotate task are received in Plesk on Ubuntu 18 or Debian 9: ‘Access denied for user ‘root’@’localhost’ (using password: NO)

Read More »

Unable to copy/back up a database in Plesk: mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table

Read More »

Plesk and its command-line utilities do not work due to missing Plesk packages

Read More »

Hosting Wiki

  • Server Redundancy
  • Horde
  • AMP
  • Bare Metal Server
  • Backup
  • MySQL
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • SQL
  • Plesk
  • SQL database
  • NoSQL Database
  • Web Server
  • DNS Server
  • SSH
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family