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 5.7Modification of forgotten root password

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

Share

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

This article mainly introduces "MySQL 5.7modify forgotten root password method", in the daily operation, I believe that many people have doubts on the method of MySQL 5.7modifying forgotten root password. Xiaobian consulted all kinds of information and sorted out a simple and easy-to-use operation method. I hope it will be helpful for you to answer the doubt of "MySQL 5.7modify forgotten root password". Next, please follow the editor to study!

The password field is no longer in the user table of the MySQL 5.7mysql library, and it is replaced by authentication_string.

The modification syntax is the same, and the steps are the same.

Note:

/ etc/my.cnf in this configuration file

Basedir, datadir these two parameters point to, if it points to an error, mysqld_safe-- skip-grant-tables starts no mysql library.

[mysql@guoqing ~] $service mysqld stop # stop the mysql service

[mysql@guoqing ~] $mysqld_safe-- skip-grant-tables & # starts mysql in grant-tables-enabled mode

[mysql@guoqing] $mysql-uroot-p-h227.0.0.1 # enter the command to enter, and enter the password prompt to enter directly.

Mysql > update mysql.user set authentication_string= password ('guo') WHERE User='root'; # change password to guo

Mysql > flush privileges; # Update permissions

Mysql > quit # exit

Service mysql start

Log in again to use the new password.

At this point, the study of "MySQL 5.7modifying the method of forgetting root password" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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