MYSQL: Use UPDATE to modify the user name and cannot log on. 1. create a user test/test www.2cto.com [SQL] mysql> create user test identified by 'test'; Query OK, 0 rows affected (0.00 sec) mysql> exit Bye 2. Use the test/test user to log on successfully [SQL] C: \ Users \ qxl> mysql-utest-ptest Welcome to the MySQL monitor. commands end with; or \ g. your MySQL connection id is 25 Server version: 5.1.28-rc-community MySQL Community Server (GPL) Type 'help; 'or' \ H' for help. type '\ C' to clear the buffer. mysql> exit www.2cto.com Bye 3. Log On As the root user and change the test user name to newuser [SQL] C: \ Users \ qxl> mysql-uroot-p Enter password: * *** Welcome to the MySQL monitor. commands end with; or \ g. your MySQL connection id is 27 Server version: 5.1.28-rc-community MySQL Community Server (GPL) Type 'help; 'or' \ H' for help. type '\ C' to clear the buffer. mysql> update mysql. user set user = 'newuser' where user = 'test'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> exit Bye 4. Failed to log on using newuser/test [SQL] C: \ Users \ qxl> mysql-unewuser-ptest ERROR 1045 (28000 ): access denied for user 'newuser' @ 'localhost' (using password: YES)