How to fix Unable to access Plesk on Linux: Access denied for user ‘admin’@’localhost’ (using password: YES)

Automated solution

The automated solution is applicable to MySQL 5.5 / MySQL 5.6 / MariaDB (any version). Solution steps: Log into the server via SSH. Download, unzip and run automatic MySQL password reset script:
# unzip
# chmod +x
# ./

Note: If the script does not work for you, write about it in the comment section of the article specifying the exact Plesk and OS version.

Errors in plesk:
# /usr/local/psa/bin/admin --show-password
SQLSTATE[HY000] [1045] Access denied for user 'admin'@'localhost' (using password: YES)
Accessing the plesk panel:

ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [1045] Access denied for user 'admin'@'localhost' (using password: YES) (Abstract.php:144)
Reset the root password UPDATE – See this for cool script to reset the password –
# service mysqld stop
# mysqld_safe --skip-grant-tables
# service mysqld start
# mysql -uadmin -p`cat /etc/psa/.psa.shadow`
# mysql -u root
# mysql> use mysql;
# mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
# mysql> flush privileges;
# mysql> quit

How to KVM, QEMU start or stop virtual machine from command line (CLI)

KVM or Kernel Based Virtual Machine is a popular virtualization technology. It allows you to run virtual guest machines over a host machine. To start...

How to Docker backup Saving and restoring your volumes

Running a Docker volume backup First, we spin up a temporary container, and we mount the backup folder and the target Docker volume to this container....

How to Start and Enable Firewalld on CentOS 7

In this article, we discuss how to start and enable firewalld. It is highly recommended that you have a firewall protecting your server.Pre-Flight CheckThese...