MySQL change user name password method detailed

Source: Internet
Author: User
Tags mysql client administrator password

Reprinted from:
Http://www.cnblogs.com/jifeng/archive/2011/06/23/2088299.html

1. Close the running MySQL.
Specifically for:ctrl+alt+delete-> Task Manager, End Mysql.exe
2. Open the DOS window and go to the Mysql\bin directory.
Specifically:->CD C:\Program files\mysql\mysql Server 5.5\bin (default installation directory, custom-similar).
3. Enter Mysqld-nt--skip-grant-tables carriage return. If the message doesn't appear, it's right.
Instead: Mysqld-nt--skip-grant-tables (There is a space between mysqld and-nt)
4. Open a DOS window again (because the DOS window is no longer moving), go to the Mysql\bin directory.
5. Enter MySQL return, if successful, a MySQL prompt will appear >
Add: If not successful, it could be mysql.exe, shut down, repeat. 5 steps
6. Connection rights database >use MySQL; (> is the original cue, don't forget the last semicolon)
7. Change Password:> update user set Password=password ("123456") where user= "root"; (Don't forget the last semicolon)
7. Refresh permissions (required steps) >flush privileges;
8. Exit > \q
9. Log out of the system, then enter, open MySQL, use the username root and just set the new password 123456 to login.
10.DOS Login:->mysql-u root-p
->123456
11. Or: Download the navicat for MySQL client, enter 123456 at the password when connecting, test the connection, success!

Mysqld-nt is the process by which MySQL daemon Controls access to the MySQL database. See Baidu Encyclopedia.
Describes a very useful mysql boot parameter ——--Skip-grant-tables. As the name implies, when you start MySQL, do not start the grant-tables, authorization table. What's the use of it? Of course it is useful to forget the administrator password.

MySQL change user name password method detailed

Related Article

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.