Skip to content

Instantly share code, notes, and snippets.

@Arafat-alim
Created June 27, 2022 16:08
Show Gist options
  • Save Arafat-alim/c517fd28fd96be951e53ce7d67620fcf to your computer and use it in GitHub Desktop.
Save Arafat-alim/c517fd28fd96be951e53ce7d67620fcf to your computer and use it in GitHub Desktop.
How to reset password of MySQL server Database.
# Now go to the Run Command (Win + R)
# Type -> services.msc
# Search MySQL8.X and disabled it. Copy the path of the services.
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe"
"C:\ProgramData\MySQL\MySQL Server 8.0\my.ini"
# Go to WIndows and search "cmd" and open cmd as an administrator.
# typed the following code
C:\WINDOWS\system32>"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server
8.0\my.ini" --init-file="C:\reset.txt" --console
#Enter -> wait for a moment to complete the task
@ Search SQL Command-Line in the Windows search.
# SQL command Line Terminal Windows Open
# Enter your updated password.
-------------------FINISH-----------------------------
For More Information - Please go through the video -> https://www.youtube.com/watch?v=rr_hDJLFvQE
ALTER USER 'root'@'localhost' IDENTIFIED BY 'your-new-password';
@Arafat-alim
Copy link
Author

reset.txt file saved into the C drive.
explorer_ERI3rOSqxf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment