Resetting your MySQL database password

Resetting your MySQL database password

Introduction
There may be instances in which you may not remember your password and this leaves you without the ability to access into your MySQL database. Now, you don’t need to worry about forgetting your password as we now offer you the option to reset and create a new password. Here are the steps that on how you can do so :

1.      Suspend the MySQL service under Windows Service.

Go into Control Panel > Select to view Small icon > Select Administrative Tools


Select Services

Select MySQL > Right click > Select Stop


2.   Next, create a TXT file with the content below

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

FLUSH PRIVILEGES;

Exit;

            You can insert your new password to replace the root.
            Save the file into C drive with name MYSQL.txt

     3.    Run COMMAND PROMPT by using your administrator privilege


4.      Now, type the command below:

C:\>"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld.exe" --defaults-file="C:\Program Files\\MySQL\\MySQL Server 5.5\\my.ini" --init-file=C:\\MYSQL.txt

In case you install MySQL into Program Files (x86) folder, please make sure that you change the command as below:

C:\>"C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin\mysqld.exe" --defaults-file="C:\Program Files (x86)\\MySQL\\MySQL Server 5.5\\my.ini" --init-file=C:\\MYSQL.txt

 
5.      Go into Control Panel > Select Small icon view > Select Administrative Tools > Services > MySQL > Right click mouse to select Start service.

Note: If some of the screenshots or steps viewed here are different from the ones in the current system, this is due to
our continuous effort to improve our system from time to time. Please notify us at info@timeteccloud.com, we will
update it as soon as possible.