In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces how to change the password in MySQL. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
1. Use the SET PASSWORD command
Step 1): enter the command mysql-u root-p to specify the root user to log in to MySQL, and then press enter to enter the password. If the environment variable is not configured, log in to the bin directory of MySQL.
Step 2): use SET PASSWORD to change the password command format to set password for username @ localhost = password (newpwd)
Where username is the user name to change the password and newpwd is the new password to be changed.
Step 3): enter the quit; command to log out of MySQL and log in again, and enter the new password "root" to log in
two。 Use mysqladmin to change the password
Use the mysqladmin command to modify MySQL's root user password format to mysqladmin-u username-p old password password new password.
Note: the following figure changes the password of the command-uroot and-proot is the whole, do not write as-uroot-proot, you can add spaces between-u and root, but there will be a warning, so do not add spaces.
3. UPDATE directly edits the user table
Step 1): enter the command mysql-u root-p to specify the root user to log in to MySQL, and then press enter to enter the password. If the environment variable is not configured, log in to the bin directory of MySQL.
Step 2): enter the use mysql; command to connect to the permissions database.
Step 3): enter the command update mysql.user set authentication_string=password ('new password') where user=' username 'and Host =' localhost'; to set the new password.
Step 4): enter the flush privileges; command to refresh permissions.
Step 5): enter the quit; command to exit MySQL and log in again, and the password has been changed to the new password you just entered.
About how to change the password in MySQL to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.