In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about how to change the password in the MySQL database, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
What are the measures for MySQL database to modify MySQL password
Step 1: use phpmyadmin, which is the easiest, modify the user table of the mysql library, but don't forget to use the PASSWORD function.
Measure 2: use mysqladmin, which is a special case stated earlier. After mysqladmin-uroot-ppasswordmypasswd enters this call, you must enter the original password of root, and then the password of root will be changed to mypasswd. Change the root in the call to your user name, and you can change your own password. Of course, in case your mysqladmin is not connected to mysqlserver, maybe you have not taken measures to enforce mysqladmin, then this measure is ineffective. And mysqladmin can't clear the password.
Note: the following measures are used under the mysql reminder, and you must have root permission for mysqlkcitrust.com:
Measure 3:
Mysql > INSERTINTOmysql.user (Host,User,Password) VALUES ('%', 'jeffrey',PASSWORD (' biscuit')); mysql > FLUSHPRIVILEGES
To be exact, this is an addition of a user with the user name jeffrey and the password biscuit. There is this example in the mysql Chinese reference Manual, so I wrote it out. Be careful to take advantage of the PASSWORD function, and then use FLUSHPRIVILEGES.
What are the measures for MySQL database to modify MySQL password
Measure 4: like measure 3, except for the use of REPLACE statements
Mysql > REPLACEINTOmysql.user (Host,User,Password) VALUES ('%', 'jeffrey',PASSWORD (' biscuit')); mysql > FLUSHPRIVILEGES
Measure 5: use SETPASSWORD statement
Mysql > SETPASSWORDFORjeffrey@ "%" = PASSWORD ('biscuit')
You must also use the PASSWORD () function, but you don't have to use FLUSHPRIVILEGES.
Measure 6: use GRANT.IDENTIFIEDBY statement
Mysql > GRANTUSAGEON*.*TOjeffrey@'% 'IDENTIFIEDBY'biscuit'
Here the PASSWORD () function is unnecessary, and there is no need to make use of FLUSHPRIVILEGES.
Beware: PASSWORD () does not enforce password encryption in the same way that Unix passwords are encrypted.
After reading the above, do you have any further understanding of how to change the password in the MySQL database? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.