MySQL Fix login for phpmyadmin

Updated: 24th December 2019
Tags: sql mysql

If you have mysql 5.7 or mysql 8+ you probably can't login to phpmyadmin as mysql default setting for logging in changed. To fix this issue, login to mysql console and run

sudo mysql -u root -p
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'new-password';
sudo service mysql stop
sudo service mysql start