当前位置:网站首页>Tutorial on principles and applications of database system (004) -- MySQL installation and configuration: resetting MySQL login password (Windows Environment)

Tutorial on principles and applications of database system (004) -- MySQL installation and configuration: resetting MySQL login password (Windows Environment)

2022-07-01 16:19:00 Rsda DBA_ WGX

Database system principle and Application Tutorial (004)—— MySQL Installation and configuration : Reset MySQL The login password (windows Environmental Science )

If you forget root The login password of the user caused root The user can't log in MySQL, The following solutions can be adopted .

Method 1 : start-up MySQL Skip security check when serving

1、 stop it MySQL service ( Run the command line window as an administrator )

 Insert picture description here

2、 start-up MySQL Skip security check when serving

 Insert picture description here

3、 Open another window , Log in with an empty password root account number , As shown in the figure below .

 Insert picture description here

4、 To reset root Account and password , As shown in the figure below .

 Insert picture description here

5、 End mysqld.exe process , Restart MySQL service , Log in to the system with a new password , As shown in the figure below .

 Insert picture description here

Method 2 、 modify MySQL Configuration file for

1、 stop it MySQL service , As shown in the figure below .

 Insert picture description here

2、 modify MySQL Configuration file for my.ini, As shown in the figure below .

 Insert picture description here

3、 stay my.ini Of documents 【MySQLd】 Partial addition :skip-grant-tables, As shown in the figure below .

 Insert picture description here

4、 preservation my.int file , start-up MySQL service , As shown in the figure below .

 Insert picture description here

5、 Sign in MySQL, Log in with an empty password , As shown in the figure below .

 Insert picture description here

6、 hold root The password of the account is changed to 123456

 Insert picture description here

7、 stop it MySQL service

 Insert picture description here

8、 modify my.ini file , Delete the content :skip-grant-tables

 Insert picture description here

9、 start-up MySQL service , Log in to the system with a new password

 Insert picture description here

原网站

版权声明
本文为[Rsda DBA_ WGX]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/182/202207011614089953.html