root3r0x

How to Reset the Root Password MYSQL Server 8.0 WINDOWS SYSTEMS

Apr 10th, 2021
999
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /** 1.- Log on to your system as Administrator.
  2.  
  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.
  5.  
  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.)
  10.  
  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
  13.  
  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. **/
  15.  
  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]
  20.  
  21. source: https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
  22.  
  23. **/
RAW Paste Data

Adblocker detected! Please consider disabling it...

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

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

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

×