How to reset the password in MySQL on windows?

    2 answers 2

    MySQLInstanceConfig.exe in the folder with mysql there you can reconfigure

    • There, when applying security settings, it hangs, i.e. cannot apply them (new password). - I_CaR

    You need to find the folder with where MySQL was installed, find the my.ini file in it and in the [mysqld] section set the directive skip-grant-tables , which you will need to start without the user privilege table

     [mysqld] ... skip-grant-tables 

    Then you can access MySQL from under any user without specifying a password.

     mysql -u root 

    Then you can set a new password for root user

     SET PASSWORD FOR 'root'@'localhost' = PASSWORD('новый пароль'); 

    After setting the password, remove the skip-grant-tables directive from my.ini and restart the MySQL server.

    • Strange, but this method does not work. - I_CaR