How to Probleme Solve PhpMyadmin Access Denied

Skinnyboys
2 min readJul 17, 2019

--

Argggh…………!!!!!!!!!

“Can’t log into phpMyAdmin: mysqli_real_connect(): (HY000/1698): Access denied for user ‘root’@’localhost’”

Since October 2015, root now requires sudo rights in MySQL 5.7+ and phpMyAdmin will not be able to use the root credentials.

You also are not advised to allow root accounts to be accessed remotely via phpMyAdmin because bots and hackers scan these accounts continuously.

Instead, create a new super user account with a different username.

Create User for phpMyAdmin
In terminal, log in to MySQL as root. You may have created a root password when you installed MySQL for the first time the password could be blank, in which case you can just press ENTER when prompted for a password. If you have forgotten your root password, you can always Reset the MySQL Root Password.

Login to Mysql

"$ sudo mysql -p -u root"

Now add a new MySQL user with your chosen username. In this example we call it pmauser (for phpmyadmin users). Make sure you change the password here with your own password. You can create a password here.

CREATE USER

CREATE USER ‘admin’@’localhost’ IDENTIFIED BY ‘asdf1234;’;

Now we will grant Superuser privileges to our new user.

GRANT ALL PRIVILEGES

GRANT ALL PRIVILEGES ON *.* TO ‘admin’@’localhost’;

atau

GRANT ALL PRIVILEGES ON *.* TO ‘admin’@’%’ WITH GRANT OPTION;

You should now be able to access phpMyAdmin using this new user account.

and now login again to phpmyadmin

user user : admin

password : admin4321

finish

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Skinnyboys
Skinnyboys

Written by Skinnyboys

UI/UX, Cloud Computing and also Enthusiast and Still learn new things everyday

No responses yet

Write a response