Home >Database >Mysql Tutorial >How to change the password in mysql black box? How to change password in mysql black window?
We all know that mysql is very powerful. However, do you know how to change the mysql password in a black window? Let’s find out with the editor below.
Specific steps to change the password:
1. We first open the black window of mysql, press the start key R to open the run, and enter cmd Enter the black window, enter the bin path where mysql is installed on the computer, and log in to mysql.
2. Then enter use mysql after mysql> to locate the mysql table, and then enter the modification statement
update user set password=password("1") where user="root"
In the above statement, we change the password to 1, and then Query OK will be displayed, proving that the password has been changed. success.
3. Then enter flush privileges. At this point, our mysql database password has been modified.
Notes
Note that if unsuccessful, please restart the database.
The above is the detailed content of How to change the password in mysql black box? How to change password in mysql black window?. For more information, please follow other related articles on the PHP Chinese website!