In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the example analysis of root initial password setting in percona 5.7.11, which is very detailed and has certain reference value. Interested friends must read it!
After installing percona5.7.11 for the first time, there is a problem that root users need to enter a password when they log in to the database (this is the security mechanism of 5.7root account)
Someone on the Internet said that there was a default password for the root account in the / root/.mysql_secret file, but I didn't find the file, so I had to crack it violently.
1. Modify the / etc/my.cnf file, add skip-grant-tables under [mysqld] and restart
Login:
[root@trcloud-gtt-dw] # mysql-uroot-p
Enter password:
Enter directly from here.
2. Modify data field information
Mysql > update mysql.user set authentication_string=password ('123456') where user='root'; (the password field before 5.7has been changed to authentication_string)
Mysql > flush privileges
3. Delete the skip-grant-tables in the / etc/my.cnf file and restart
Login:
[root@trcloud-gtt-dw] # mysql-uroot-p
Enter password: (enter the password you just set)
Reset the password after the first login to operate the database
Mysql > set password=password ('123456')
Note: in addition to modifying the / etc/my.cnf file, you can also close the data and use mysqld_safe-- skip-grant-tables & mysql-uroot-p to enter the database to change the root password. The principle of the two methods is the same, but the operation mode is different.
The above is all the contents of the article "sample Analysis of root initial password setting in percona 5.7.11". Thank you for reading! Hope to share the content to help you, more related knowledge, 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.
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.