In MySQL database system we modify the user password in a total of three ways
The first type: SET PASSWORD mode
# Modify the current login client user password mysql> SET password=password (' 123456789 '); Query OK, 0 rows Affected (0.00 sec) # Specify user to modify ' root ' @ ' localhost ' # mysql user name composition comparison Special ' User name ' @ ' hostname ' mysql> SET PASSWORD for ' r Oot ' @ ' localhost ' = PASSWORD (' 771541213 '); Query OK, 0 rows Affected (0.00 sec)
Second: Use DML language to modify
# Modify user all user table root password password built-in MySQL function mysql> UPDATE ' user ' SET password=password (' 123123 ') WHERE user= ' root '; Query OK, 3 Rows Affected (0.00 sec) Rows Matched:3 changed:3 warnings:0# Notification Process mysqld Reload configuration data mysql> flush Privileg Es Query OK, 0 rows Affected (0.00 sec)
The third type: Client tool modification
# Use MySQL database client tool to change password [[email protected] ~]# mysqladmin-hlocalhost-uroot-p123123 password ' 123456789 '
MySQL Modify user password