Reset root password in phpmyadmin

If we are not using phpadmin on window machine for sometime, we may forget the root password of phpmyadmin, and that stop us from using all the other php application that we were developing with the help of phpadmin , because we must login to admin module first.

Nothing to worry! We can reset some new password for accessing the root of MyPhpAdmin, that all solve all the problem.

Reset phpmyadmin root password in windows

This is how your phpadmin may look like when you access on localhost, right!

mysql login in php admin

How to reset mysql root password

Now let’s reset the root password, please follow the steps below.

Step 1: Stop mysql56 instance

Go to following location, Administrative tools => Services Control Panel\System and Security\Administrative Tools => Services Stop the mysql instance (find mysql56, right click and stop)

Step 2: write SQL command in notepad

Create a text file in root of any drive of local machine with name "reset-mysql.txt" Write following command in that

USE mysql;
UPDATE mysql.user SET Password = PASSWORD('mypass123') WHERE User ='root';
FLUSH PRIVELEGES;

Save the file and close the window.

Step 3: Open command window from mysql bin folder

Go to mysql bin folder Folder may be located at “C:\Program Files\MySQL\MySQL Server 5.6\bin”

Then press shift and right click anywhere in bin folder then click on “Open the command window here”, that will open the command window, keep the window open.

Step 4: ProgramData folder

Now go to my.ini file in following folder [note: “ProgramData” folder may be hidden, you need to enable show hidden folder in window explorer]
C:\ProgramData\MySQL\MySQL Server 5.6 \my.ini
Copy the above path and close the window

Step 5: Execute the command

Come to command window that was kept open

mysqld --deafult-file="C:\\ProgramData\\MySQL\\MySQL Server 5.6 \\my.ini"  --init-file=D:\mysql-reset.txt
Execute the command, Password has been reset

Now you can login to myphpadmin with new password

 
Reset root password of phpmyadmin in XAMPP
MySql Database Development Tutorials.
MySQL Examples | Join Asp.Net SQL Course