PHPMyAdmin Access Denied for user ‘root’@’localhost’ Ubuntu

  • Access to a command line or terminal
  • MySQL or MariaDB installed
  • User with sudo or root privileges

Step 1 – Login as Root user MySQL

mysql -u root -p
OJS 3.3.0-8 Localhost Install Issue

You can enable access for root using one MySQL command.

sudo mysql

Enter your password at the prompt. A MySQL shell loads.

OJS 3.3.0-8 Localhost Install Issue
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'insert_password';
OJS 3.3.0-8 Localhost Install Issue
 mysql> FLUSH PRIVILEGES; 

Step 2 – Restart Apache Server

sudo service apache2 restart
http://[SERVER_PUBLIC_IP]/phpmyadmin

Then you will look like on your browser:

OJS 3.3.0-8 Localhost Install Issue

Conclusion

OJS 3.3.0-8 Localhost Install Issue