In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
What if mysql8.0 forgets his login password? In view of this problem, today the editor summarizes this article about finding the password, hoping to help more students who want to solve this problem to find a more simple and easy way.
Pkill mysqld, shut down mysql.
Skip the permission table of MySQL to start the MySQL service:
-- skip-grant-tables starts mysql
/ usr/local/mysql8013/bin/mysqld_safe-defaults-file=/data/mysql8/my8.cnf-skip-grant-tables &
Leave the password blank:
Root@localhost [(none)] > update mysql.user set authentication_string='' where user= "root" and host= "localhost"; Query OK, 1 row affected (0.06 sec) Rows matched: 1 Changed: 1 Warnings: 0root@localhost [(none)] >
Pkill mysqld, shut down mysql.
Start the mysql service again
[root@localhost] # / usr/local/mysql8013/bin/mysqld-- defaults-file=/data/mysql8/my8.cnf &
Log in to the MySQL service without a password and set a new password:
Root@localhost [(none)] > select version (); +-+ | version () | +-+ | 8.0.13 | +-+ root@localhost [(none)] > alter user user () identified by 'jist558@wei'
[root@localhost ~] # mysql-uroot-paired jist558Wei'e "select version ();"
Mysql: [Warning] Using a password on the command line interface can be insecure.
+-+
| | version () |
+-+
| | 8.0.13 |
+-+
When the password is written into the .my.cnf file, mysql can log in directly to the mysql window:
[root@localhost ~] # cat .my.cnf [mysql] prompt= "\ u@\ h:\ p\ R:\ m:\ s [\ d] >" no-auto-rehashuser=rootpassword=jist558@wei [root@localhost ~] # mysql-e "select version ();" +-+ | version () | 8.0.13 | +-+
About the mysql8.0 forgot login password solution to share here, to solve the problem is not only the article and everyone's analysis of the method, but the accuracy of this analysis is indisputable. For more related content, please 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.
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.