How to reset SQL root password
Lost your MySQL root password? Resetting MySQL root password is simple. Please follow these steps-
# Login to your MySQL server.
# Locate the mysql.ini file.
-This should be something like C:\MySQL\my.ini or “C:\Program files\MySQL\bin\mysqld-nt.exe” –defaults-file=”C:\Program files\MySQL\Data\my.ini” MySQL
-You can also check this by viewing the Properties of the MySQL service command line under the Services MMC.
# Edit the appropriate *.ini file and add the following line immediately after [mysqld] ;
skip_grant_tables = 1
# Restart the MySQL service. Please note that MySQL is now running unsecured.
# From a command prompt, change to the /bin directory (Ususally C:\MySQL\bin or whereever under MySQL installed location) and enter the following command to login as root:
mysql -u root
# Then input the following command:
update mysql.user SET Password = Password(’newpassword’) WHERE User=’root’;
# Now remove the line you added to my.ini in previous step and restart MySQL.
# Make sure you can login to MySQL using the updated password.
# Login to your MySQL server.
# Locate the mysql.ini file.
-This should be something like C:\MySQL\my.ini or “C:\Program files\MySQL\bin\mysqld-nt.exe” –defaults-file=”C:\Program files\MySQL\Data\my.ini” MySQL
-You can also check this by viewing the Properties of the MySQL service command line under the Services MMC.
# Edit the appropriate *.ini file and add the following line immediately after [mysqld] ;
skip_grant_tables = 1
# Restart the MySQL service. Please note that MySQL is now running unsecured.
# From a command prompt, change to the /bin directory (Ususally C:\MySQL\bin or whereever under MySQL installed location) and enter the following command to login as root:
mysql -u root
# Then input the following command:
update mysql.user SET Password = Password(’newpassword’) WHERE User=’root’;
# Now remove the line you added to my.ini in previous step and restart MySQL.
# Make sure you can login to MySQL using the updated password.
0