You can use the MySQL command line to modify the password of the MySQL database. The following describes the MySQL Command Line in detail. If you are interested, take a look.
You can use the MySQL command line to modify the password of the MySQL database. The following describes the MySQL Command Line in detail. If you are interested, take a look.
You can use the MySQL command line to modify the password of the MySQL database. The following describes the MySQL Command Line in detail. If you are interested, take a look.
Format: mysqladmin-u username-p old password New password
1. Add a 1111 password to the root user. First, enter the mysql \ bin directory under DOS, and then type the following command
Mysqladmin-u root-password 1111
Note: because the root account does not have a password at the beginning, the old-p password can be omitted.
2. Change the password of root to 1234.
Mysqladmin-u root-p ab12 password 1234
(Note: Unlike the above, the following commands in the MYSQL environment are followed by a semicolon as the command Terminator)
3. Change the root password through the command line:
Mysql> UPDATE mysql. user SET password = PASSWORD ('new password') WHERE User = 'root ';
Mysql> flush privileges;
4. display the current user:
Mysql> select user ();