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.
This is how your phpadmin may look like when you access on localhost, right!
Now let’s reset the root password, please follow the steps below.
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)
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.
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.
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
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.txtExecute the command, Password has been reset
Now you can login to myphpadmin with new password