how do I change my root password in windows?

0

I lost the root password I put when I installed MySQL, but I do not know how to reset / change without knowing the password

    
asked by anonymous 09.12.2018 / 16:43

1 answer

1
  • Stop MySQL completely. This can be done by going to the Windows XP Services window, Windows Server 2003, and the like, where you can stop the MySQL service. >
  • Open the command prompt by typing cmd into the run window. Within it navigate to the bin folder of MySQL . Ex: C:\mysql\bin using the cd command.
  • Run the following command at the command prompt: mysqld.exe-u root - skip-grant-tables
  • Leave the current command prompt as it is, and open a new command prompt.
  • Go to the bin folder of MySq L, Ex: C: \ mysql \ bin using the cd command. Type mysql and press Enter .
  • You should now have the MySQL command prompt working. Type use mysql; to select the database mysql .
  • Run the following command to update the password: UPDATE user SET Password = PASSWORD ( 'NOVA_SENHA') WHERE User = 'root';
  

Source: Resetting MYSQL root password in WINDOWS XP / server 2003

    
09.12.2018 / 16:58