![phpmyadmin](https://skayal.com/wp-content/uploads/2020/06/kisspng-logo-phpmyadmin-mysql-font-5b776a8b7ad027.4703098115345527155031.png)
10
Mar
Can’t log into phpMyAdmin: mysqli_real_connect(): (HY000/1698): Access denied for user ‘root’@’localhost’
Comments
MySQL 5.7 and above
Creating a Superuser for phpMyAdmin
In terminal, log in to MySQL as root
.
sudo mysql -p -u root
CREATE USER 'pmauser'@'localhost' IDENTIFIED BY 'password_here';
Now we will grant superuser privilege to our new user pmauser
.
GRANT ALL PRIVILEGES ON *.* TO 'pmauser'@'localhost' WITH GRANT OPTION;
You should now be able to access phpMyAdmin using this new user account.