phpmyadmin access denied for user 'root'@'localhost' code example
Example 1: mysql access denied for user 'root'@'localhost'
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
Example 2: phpMyAdmin access denied message
Open the phpMyAdmin folder.
Open the config.inc.php file with any text editor.
Under “Authentication type and info,” and update the following lines:
On $cfg['Servers'][$i]['auth_type'] = 'config'; replace config for cookie.
On $cfg['Servers'][$i]['AllowNoPassword'] = true; replace true for false.