MySql教程

mysql5.6 windows 平台上忘记root密码重置

本文主要是介绍mysql5.6 windows 平台上忘记root密码重置,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

https://stackoverflow.com/questions/21651898/resetting-root-password-in-mysql-5-6

 

On Windows:

0) shut down service mysql56

1) go to C:\ProgramData\MySQL\MySQL Server 5.6, note that ProgramData is a hidden folder

2) looking for file my.ini, open it and add one line skip-grant-tables below [mysqld],save

[mysqld]

skip-grant-tables

3) start service mysql56

4) by right, you can access the database, run mysql

5) and use the query below to update the password

update mysql.user set password=PASSWORD('NEW PASSWORD') where user='root';

note: for newer version, use authentication_string instead of password

6) shut down the service again, remove the line skip-grant-tables save it, and start the service again. try to use the password you set to login.

这篇关于mysql5.6 windows 平台上忘记root密码重置的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!