Search  
Friday, November 21, 2008 ..:: home<page> ::.. Register  Login
 How to reset the MySQL root user privileges on Windows Minimize
Location: BlogsonDevelopment+=1;    
Posted by: Javier Callico 10/23/2007

Follow these steps to reset the MySQL root user privileges on Windows:

1- Stop the MySQL service

2- Open a command prompt and run the following command:

D:\MySQL\MySQL Server 4.1\bin>mysqld-nt --skip-grant-tables

3- Open a new command prompt and connect to the mysqld server with this command:

D:\MySQL\MySQL Server 4.1\bin>mysql -u root

4- Issue the following statements in the mysql client:

mysql> FLUSH PRIVILEGES;

mysql> USE mysql;

mysql> REPLACE INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);

mysql> REPLACE INTO user VALUES ('%','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);

mysql> quit;

5- Open the windows task manager and kill the process with name mysqld-nt.exe

6- Start the MySQL service and now you will have the root privileges back :-)


Note: This article assumes that MySQL was installed on "D:\MySQL\MySQL Server 4.1"

Permalink |  Trackback

Your name:
Title:
Comment:
Add Comment   Cancel 
  

 Contact Information Minimize
By e-mail:
info at callicode.com

By phone:
416 857 5750

View Javier Callico's profile on LinkedIn
    

 Blog Directories Minimize
    

Copyright 2006 by My Website   Terms Of Use  Privacy Statement
DotNetNuke® is copyright 2002-2008 by Perpetual Motion Interactive Systems Inc.