Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if I forget the password of mysql?

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "the password of mysql forgot how to do". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The actual operations under Windows are as follows

1. Close the running MySQL.

two。 Open the DOS window and change to the mysqlin directory.

3. Enter mysqld-- skip-grant-tables enter. If there is no prompt, that's right.

4. Open another DOS window (because the DOS window just now cannot be moved), and change to the mysqlin directory.

5. Enter mysql to enter, and if successful, the MySQL prompt will appear >

6. Connection permissions > use; (> is an existing prompt, don't forget the last semicolon)

6. Change the password: > update user set password=password ("520") where user= "root"; (don't forget the last semicolon)

7. Refresh permissions (required) > flush privileges

8. Exit > Q

9. Log out of the system, re-enter, open MySQL, and log in with the user name root and the new password 123456 you just set.

The first step

C:Documents and SettingsAdministrator > cd D:webwww.2cto.comMysqlMySQL Se

Rver5.5in

C:Documents and SettingsAdministrator > d:

D:webwww.2cto.comMysqlMySQL Server5.5in > mysqld-- skip-grant-tables

The second step

Microsoft Windows [version 5.2.3790]

(C) copyright 1985-2003 Microsoft Corp.

C:Documents and SettingsAdministrator > cd D:webwww.2cto.comMysqlMySQL Se

Rver5.5in

C:Documents and SettingsAdministrator > d:

D:webwww.2cto.comMysqlMySQL Server5.5in > mysql

Welcome to the MySQL monitor. Commands end with; or g.

Your MySQL connection id is 1

Server version: 5.5.10 MySQL Community Server (GPL)

Copyright (c) 2000, 2010, and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

Affiliates. Other names may be trademarks of their respective

Owners.

Type help; or h for help. Type c to clear the current input statement.

Mysql > use mysql

Database changed

Mysql > update user set password=password ("520") where user= "root"

Query OK, 1 row affected (0.00 sec)

Rows matched: 1 Changed: 1 Warnings: 0

Mysql > flush privileges

Query OK, 0 rows affected (0.00 sec)

Mysql > Q

Bye

D:webwww.2cto.comMysqlMySQL Server5.5in >

This is the end of the content of "forget what to do with the password of mysql". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report