Tag Archives: MySQL

Reset MySQL Root Password On Windows

If the installation took place using the Windows Installer, you need to do the following:

  1. Stop the MySQL service (via services.msc)
  2. Create a Text File with Read Access to Everyone (easiest way) containing the following code. In this example the file is named C:\Temp\mysql_reset_root.txt:
  3. Invoke the following cmd command (depending on your MySQL Version you may adjust the directory name) with Administrative Access:
    In my case after invoking the command it dit not return a value and idled for more than 30 minutes. But I was able to login very shortly.
-- Text File Content of C:\Temp\mysql_reset_root.txt

ALTER USER 'root'@'localhost' IDENTIFIED BY '{YOURNEWPASSWORDHERE}';
-- Run Cmd with Administrator rights...

C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld --defaults-file="C:\\ProgramData\\MySQL\\MySQL Server 8.0\\my.ini" --init-file=C:\\Temp\\mysql_reset_root.txt

For more information go here… https://dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/resetting-permissions-windows.html