In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, the editor will bring you the root login password on how to crack the MySQL5.7 database. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
Introduction to this document describes in detail the root login password for cracking the MySQL5.7 database
Forget the root login password
[root@MySQL1] # mysql-uroot-p1231234mysql: [Warning] Using a password on the command line interface can be insecure.ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Add skip-grant-tables to the / etc/my.cnf configuration file to bypass MySQL5.7 database password verification
[root@MySQL1 ~] # echo skip-grant-tables > > / etc/my.cnf [root@MySQL1 ~] # / etc/init.d/mysqld restartShutting down MySQL.. SUCCESS! Starting MySQL. SUCCESS!
Directly use the mysql command to log in to the MySQL5.7 database and change the root login password
[root@MySQL1] # mysqlWelcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 3Server version: 5.7.19-log Source distributionCopyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'c'to clear the current input statement.mysql > ALTER USER 'root'@'localhost' IDENTIFIED BY' password';ERROR 1290 (HY000): The MySQL server is running with the-- skip-grant-tables option so it cannot execute this statementmysql > flush privileges;Query OK, 0 rows affected (0.00 sec) mysql > ALTER USER 'root'@'localhost' IDENTIFIED BY' password';Query OK, 0 rows affected (0.00 sec) mysql > quitBye
Note: if an ERROR 1290 (HY000): The MySQL server is running with the-- skip-grant-tables option so it cannot execute this statement error occurs while performing this step. Then execute the flush privileges; command, and then execute the command.
Log in to the MySQL5.7 database with the new password password
[root@MySQL1] # mysql-uroot-ppasswordmysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 4Server version: 5.7.19-log Source distributionCopyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql > exitBye
You cannot log in to the MySQL5.7 database with a different password
[root@MySQL1] # mysql-uroot-ppassworddmysql: [Warning] Using a password on the command line interface can be insecure.ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Optimize
Delete the skip-grant-tables in / etc/my.cnf
[root@MySQL1] # sed-I-e'/ skip-grant-tables/d' / etc/my.cnf
Restart the database
[root@MySQL1] # / etc/init.d/mysqld restart the above is shared by Xiaobian on how to crack the root login password of MySQL5.7 database. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.