How to Reset the Root Password MYSQL Server 8.0 WINDOWS SYSTEMS

Apr 10th, 2021
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /** 1.- Log on to your system as Administrator.
  3. 2.- Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager: From the Start menu, select Control Panel, then Administrative Tools, then Services. Find the MySQL service in the list and stop it.
  4. If your server is not running as a service, you may need to use the Task Manager to force it to stop.
  6. 3.-Create a text file containing the password-assignment statement on a single line. Replace the password with the password that you want to use. **/
  7. ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
  8. /**
  9. (Change 'MyNewPass' for the password that you want.)
  11. 4.- Save the file. This example assumes that you name the file C:\mysql-init.sql
  12.   I'ts very importan to put extension .sql
  14. 5.-Open a console window to get to the command prompt: From the Start menu, select Run, then enter cmd as the command to be run. **/
  16. C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqld --defaults-file="C:/ProgramData/MySQL/MySQL Server 8.0/my.ini" --init-file=C:/mysql-init.sql
  17. /**
  18. START the MYSQL SERVER from services of windows, and check in you command promt whit mysql -u root -h localhost -p
  19. [Enter the new pasword]
  21. source:
  23. **/
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.