Use the MySQL command line to change the password bitsCN.com
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 password ab12 to the root user. First, enter the mysql/bin directory under DOS, and then type the following command
Mysqladmin-u root-password ab12
Note: Because the root account does not have a password at the beginning, the old-p password can be omitted.
2. change the root password to djg345.
Mysqladmin-u root-p ab12 password djg345
(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 ();
The above is the use of MySQL command line to change the password _ MySQL content, for more information, please follow the PHP Chinese network (www.php1.cn )!