In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces mysql5.7 how to change the 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 the editor take you to understand it.
The way to change the password: 1, execute the "mysql-u root-p" command and enter the password to log in to MySQL;2, using the "set password for user name @ localhost = password ('new password');" statement to modify the password.
The operating environment of this tutorial: windows7 system, mysql5.7 version, Dell G3 computer.
When using the database, we may encounter situations where MySQL needs to change the password, such as the password is too simple and needs to be changed. This section mainly introduces two ways to change the password of the MySQL database.
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 in the format of set password for username @ localhost = password (newpwd); where username is the user name to change the password and newpwd is the new password to change. As shown in the figure.
After changing the password, enter the quit; command to exit 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.
Thank you for reading this article carefully. I hope the article "how to change your password in mysql5.7" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to 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.