In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
First, problems
Mysql5.7 under linux forgot password
II. Solution
Step 1: open mysql5.7 's configuration file my.cnf and add a line to it: skip-grant-tables save and exit (: wq)
[root@iz09a32x1sghz3z ~] # vi / etc/my.cnf
Step 2: restart mysql
[root@iz09a32x1sghz3z ~] # service mysqld restart
Step 3: log in to mysql and change your password
Log in with your root account: [root@iz09a32x1sghz3z ~] # mysql-u root
Use the mysql database in mysql: mysql > use mysql
Change the password: update user set authentication_string = password ("Szfore_68638") where user= "root"
Refresh database: flush privileges
Exit: quit
Note: the password field in mysql5.7 's user table has been changed to the authentication_string field.
At this point, the command you need to enter is update user set authentication_string = password ("Szfore_68638") where user= "root"
Step 4: open the configuration file my.cnf of mysql5.7 and add the line: skip-grant-tables delete save and exit (: wq)
Step 5: restart mysql and log in with the modified password.
[root@iz09a32x1sghz3z ~] # service mysqld restart
Summary
The above is introduced by the editor to solve the problem of forgetting password in Mysql5.7 under Linux. I hope it will be helpful to you. If you have any questions, you are welcome to leave a message. The editor will reply to you in time!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.