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 you forget your password in mysql?

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

Editor to share with you how to forget the password in mysql, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

How to reset your MySQL root password:

1. Edit MySQL configuration file my.cnf system operation and maintenance www.osyunwei.com warm reminder: qihang01 original content ©copyright, reprint please indicate the source and the original link vi / etc/my.cnf # edit the file, find [mysqld], add a line below skip-grant-tables [mysqld] skip-grant-tables:wq! # Save and exit service mysqld restart # restart MySQL service 2, enter the MySQL console mysql-uroot-p # and press enter directly There is no need to enter the root password at this time. 3. Modify root password system operation and maintenance www.osyunwei.com warm reminder: qihang01 original content ©copyright, reprint please indicate the source and the original link update mysql.user set password=password ('123456') where User= "root" and Host= "localhost"; flush privileges; # refresh system authorization form grant all on *. * to' root'@'localhost' identified by '123456' with grant option 4. Cancel the skip-grant-tablesvi / etc/my.cnf edit file in / etc/my.cnf, find [mysqld], and delete the skip-grant-tables line: wq! # Save exit 5, restart mysqlservice mysqld restart # restart mysql, at this time, the root password of mysql has been changed to 1234566. Enter mysql-uroot-p # on the mysql console and enter the mysql console 123456 # to enter the password.

If it is version 5.6 or above

Update user set authentication_string=PASSWORD ('sys123') whereUser='root';update mysql.user set authentication_string=password (' Test.com.cn') where user='mysqlback' and Host = 'localhost'; above is all the contents of the article "how to forget your password in mysql". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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

Internet Technology

Wechat

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

12
Report