There are many ways to change the mysql password. If you have a blank password, you cannot use phpmyadmin to log on. We can only use command mode to operate.
There are many ways to change the mysql password. If you have a blank password, you cannot use phpmyadmin to log on. We can only use command mode to operate.
You can use the Mysql update command to modify the old root password or set the root password to null. If you use the update command to change the root password, you need to use the built-in Mysql encryption function PASSWORD (string), which is used to encrypt a plaintext PASSWORD and cannot be decrypted. set the password in the user (user permission table)
Use the update command to change the root password as follows:
| The Code is as follows: |
|
|
Mysql> use mysql
Database changed
Mysql> update user set password = PASSWORD ('000000') where user = 'root ';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
Mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec) |
In this case, download and modify the password.