How to reset Mysql Root Password on Windows

 

1) Go to Task Manager > Services

2) Find your mysql service. Right Click and click stop
stop

3) Create mysql-init.txt file and put it on your desktop.
4) Inside this .txt file, write this down:
USE mysql;
UPDATE mysql.user SET Password=PASSWORD('newPassword') WHERE user = 'root';
FLUSH PRIVILEGES;

5) Go to your command line, and navigate to your MYSQL Server directory. Mine is Mysql Server 5.6 and i install it on Program Files(x86), so I will type “cd C:\Program Files (x86)\Mysql Server 5.6″. Press enter

6) Then, go type this:
bin\mysqld.exe –default-file=”my.ini”–init-file=”C:\\Users\\ryzal_00\\Desktop\\mysql-init.txt” –console

**NOTE: replace ryzal_00 with your own username.

No comments yet.

Leave a Reply