Home>Article>Database> How to change the password in mysql black box? How to change password in mysql black window?

How to change the password in mysql black box? How to change password in mysql black window?

little bottle
little bottle Original
2019-05-13 14:07:46 4812browse

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.

How to change the password in mysql black box? How to change password in mysql black window?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn