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 > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following brings you about forgetting how to reset the mysql administrator password. If you are interested, let's take a look at this article. I believe it will help you to forget how to reset the mysql administrator password after reading it.
1. Install mysql for the first time and start the service
two。 Set Boot self-boot
3. Check to see if the service has started
4. The password for the first login to mysql needs to be found in / var/log/mysqld.log, as shown in the figure. The password for the first login to the service database is (26JYPhpP?KN).
5. Log in to mysql for the first time
Mysql-u root-p (26JYPhpP?KN
6. The password needs to be modified before it can be used normally. Due to the requirement of password complexity, the password policy is generally modified.
Insert it in the [mysqld] location of the figure in / etc/my.cnf, and save and launch it later.
7. Restart the mysql service
Systemctl restart mysqld
8. Enter the database and change the password to 123456
Alter user root@ "localhost" identified by "123456"
9. After launching and rebooting, you can log in with a new password.
Two: forget the administrator's password and change the password again.
1. Enter vim / etc/my.cnf
Comment out the password policy and insert the command to skip password authentication
two。 Restart the mysql service
Systemctl restart mysqld
3. Directly access the database through mysql
4. Change the password to abc123
Mysql > update mysql.user set authentication_string=password ("abc123") where user= "root" and host= "localhost"
Mysql > flush privileges
Mysql > quit
5. Exit, enter / etc/my.cnf
6. Log in with a new password
Mysql-u root-pabc123
Read the details above about how to reset the password of the mysql administrator, and whether you have gained anything. If you want to know more about it, you can continue to follow our industry information section.
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.