Blog

23/06/2019

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:
wget https://support.plesk.com/hc/article_attachments/360002746434/mysql_passwd_reset.zip
# unzip mysql_passwd_reset.zip
# chmod +x mysql_passwd_reset.sh
# ./mysql_passwd_reset.sh

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 – https://support.plesk.com/hc/en-us/articles/213364309-Unable-to-access-Plesk-on-Linux-Access-denied-for-user-admin-localhost-using-password-YES-
# service mysqld stop
# mysqld_safe --skip-grant-tables
# service mysqld start
Login:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow`
Or,
# mysql -u root
# mysql> use mysql;
# mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
# mysql> flush privileges;
# mysql> quit
14/08/2019

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...
14/08/2019

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....
12/08/2019

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...