Reseting MySQL Root Password on Windows

For you who lost your mysql root password, you can follow this step to reset your password.

1. Log on to your system administrator account on your PC. To make sure you have grant access.

2. stop your mysql service. Go to start > run > type services.msc find service use name mysql or mysql-nt or you have specified OR open your taskmanager and kill the mysql process.

3. create file using notepad and write this statement

UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root'; FLUSH PRIVILEGES;

save as reset.txt on drive C:

4. run your mysql service using command prompt
click  start > run > cmd
point your directory to drive C
and execute this statement

C:\> <strong><code>C:\mysql\bin\mysqld-nt --init-file=C:\\reset.txt</code></strong>

you can also add –console to see the progress of the process :D

5. just press ctrl + c if have execute that statement because this process appear to be unfinished.

6. You should now be able to connect to the MySQL server as root using the new password. Stop the MySQL server, then restart it in normal mode again. If you run the server as a service, start it from the Windows Services window. If you start the server manually, use whatever command you normally use.

7. try to login using root with your new password as you typed in file.

hope this help.

Perihal puspabangun
seseorang yang senang berselancar di internet... :)

Tinggalkan Balasan

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Ubah )

Twitter picture

You are commenting using your Twitter account. Log Out / Ubah )

Facebook photo

You are commenting using your Facebook account. Log Out / Ubah )

Connecting to %s

Ikuti

Get every new post delivered to your Inbox.