In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
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 8.0 forget how to use the root user password, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand it.
Forgetting the root user password, first restart the mysqld service using the following
[root@mysql8-01 ~] # systemctl set-environment MYSQLD_OPTS= "--skip-grant-tables"
[root@mysql8-01 ~] # systemctl stop mysqld
[root@mysql8-01 ~] # systemctl start mysqld
If you need to use a simple password, you need to modify the system parameters:
Set global validate_password.policy=0
Set global validate_password.length=4
Then log in:
[root@mysql8-01 ~] # mysql
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 7
Server version: 8.0.14 MySQL Community Server-GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Mysql >
Mysql > ALTER USER 'root'@'*' IDENTIFIED BY' 123456'
ERROR 1290 (HY000): The MySQL server is running with the-- skip-grant-tables option so it cannot execute this statement
Mysql > flush privileges
Query OK, 0 rows affected (0.02 sec)
Mysql > ALTER USER 'root'@'*' IDENTIFIED BY' 123456'
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
Mysql > set global validate_password.policy=0
Query OK, 0 rows affected (0.00 sec)
Mysql > set global validate_password.length=4
Query OK, 0 rows affected (0.00 sec)
Mysql > flush privileges
Query OK, 0 rows affected (0.01 sec)
Mysql > ALTER USER 'root'@'*' IDENTIFIED BY' 123456'
ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'*'
Mysql > ALTER USER 'root'@'localhost' IDENTIFIED BY' 123456'
Query OK, 0 rows affected (0.00 sec)
Mysql > flush privileges
Query OK, 0 rows affected (0.00 sec)
Mysql >
Mysql > exit
Thank you for reading this article carefully. I hope the article "mysql 8.0 forgot how to use root user password" shared by the editor will be helpful to you. At the same time, I also hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!
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.