How to solve “Access denied for user 'phpmyadmin'@'localhost' (using password: YES)"
Solution 1:
I know this post is old, but here is what happened to me. I was upgrading and the phpmyadmin installer asked what the phpmyadmin user password should be, or to leave it blank to random generate a password. I hit enter without entering any password by mistake. So when I launched PHPMyAdmin, I got the error "mysqli_real_connect(): (HY000/1045): Access denied for user 'phpmyadmin'@'localhost' (using password: YES)".
To fix it, I found the "config-db.php" file in /etc/phpmyadmin/ and got the password from there. Root access to PHPMyAdmin was working, so I logged in as root to PHPMyAdmin and used the query "SET PASSWORD FOR 'phpmyadmin'@'localhost' = PASSWORD([copy and paste the password here])" and it worked!