HOW TO RESET MYSQL ROOT PASSWORD ON WINDOWS
It just happens that you forget your MySQL root user password. And the answers you find online simply don't work. As always there is an complete and easy solution on Moder Software Trends site. Just follow theese steps and you will be good to go.
HOW TO RESET MYSQL
ROOT PASSWORD ON WINDOWS
1. 1. Stop MySQl Service @ services.msc
2. 2. Create file change_mysql_pwd.txt with following content (replase YourNewPassword
with desired new passwort you want to have for root user:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'YourNewPassword';
3. 3. Save the file unter C:\ change_mysql_pwd.txt
4. 4. Run CMD.exe as Admin (Start->Cmd->Right Click->Run as Administrator)
5. 5. Type in cmd: cd "C:\Program Files\MySQL\MySQL Server 8.0\bin"
. 6. Create “Data” Folder under "C:\Program Files\MySQL\MySQL Server 8.0\ (if already exists delete its contents!)
. 7. Type in cmd: mysql --initialize
8.. 8. Type in cmd: mysqld --init-file=C:\\change_mysql_pwd.txt
8.. 9. Login with root user account and the
passwort set above.
8.. 10. Delete C:\ change_mysql_pwd.txt file
Post a Comment
0 Comments
Thanks!