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

How to simply reset the mysql root password

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly introduces how to simply reset the mysql root password, the content of the article is carefully selected and edited by the author, with a certain pertinence, the reference significance for everyone is still relatively great, the following with the author to understand how to simply reset the mysql root password.

1. Edit the / etc/my.cnf configuration file with the command, that is, vim / etc/my.cnf or vi / etc/my.cnf

2. Add skip-grant-tables under [mysqld], then save and exit.

3. Restart the mysql service: service mysqld restart

4. After restarting, execute the mysql command to enter the mysql command line

5. Modify the password of root user

MySQL > UPDATE mysql.user SET Password=PASSWORD ('new password') where USER='root'

MySQL > flush privileges

MySQL > exit

6. Comment out the skip-grant-tables in / etc/my.cnf, and then restart mysql, namely: service mysqld restart

After reading the above about how to simply reset the mysql root password, many readers must have some understanding. If you need to get more industry knowledge and information, you can continue to follow our industry information column.

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