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

MySQL forgot his password and could not log in.

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

Share

Shulou(Shulou.com)06/01 Report--

1. Edit the mysql configuration file my.ini (under the installation directory of mysql, mine is in D:\ Program Files\ MySQL\ MySQL Server 5.0\ my.ini), add a line under the entry [mysqld] and restart mysql after saving and exiting.

2. Enter mysql-u root-p in cmd to log in to mysql

3. Enter the mysql database:

Mysql > use mysql

Database changed

4. Set a new password for root users:

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

Query OK, 1 rows affected (0.01sec)

Rows matched: 1 Changed: 1 Warnings: 0

5. Comment out the skip-grant-tables added in step 1. Save exit and restart.

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