MYSQL: Use UPDATE to modify the user name and cannot log on

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.