Modify and reset the MySQL password _ MySQL under WampServer

Source: Internet
Author: User
After WampServer is installed, the password is blank. There are two ways to modify the password: one is to directly modify the password through phpMyAdmin, and the other is to use the WAMP MySql console to modify the password. Type 1: ① click [user] on The phpMyAdmin interface, and set all user names in the user profile to [root]. after WampServer is installed, the password is blank,

ModifyThere are two methods:

One is to directly modify it through phpMyAdmin;

Second, use the MySql console of WAMP to modify.

First:

① Click [user] on The phpMyAdmin interface and set all user names in the user profile to [root]

Change all user passwords to [password to be modified ].

Click edit permission to change the password.

② Find the [config. inc. php] file in the phpmyadmin folder under the wamp \ apps Directory,

Modify [$ cfg ['servers'] [$ I] ['password'] = '']; it is [$ cfg ['servers'] [$ I] ['password'] = 'password to be modified ';].

Restart the service.

Second:

① Open the mysql console of WAMP and prompt to enter the password. if the start password is blank, press enter.

② Enter [use mysql] and the console prompts [Database changed]

③ Enter [update user set password = PASSWORD ('password to be changed ') where user = 'root ';],

The console prompts [Query OK, XXXXXXXXX]

④ Enter "flush privileges" and submit

⑤ Enter [quit] to exit.

6. find the [config. inc. php] file in the phpmyadmin folder under the wamp \ apps Directory,

Modify [$ cfg ['servers'] [$ I] ['password'] = '']; it is [$ cfg ['servers'] [$ I] ['password'] = 'password to be modified ';].

Restart the service.


Reset password:
① Add "skip-grant-tables" at the bottom of the "mysqlId" field in the file "my. ini" and restart the mysql service.

② Go to the mysql console and change the password again in the second password change method above.

③ After changing the password, delete the [skip-grant-tables] added in [my. ini.

④ Restart the service

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.