Modify and reset the MySQL password under WampServer, wampservermysql

Source: Internet
Author: User

Modify and reset the MySQL password under WampServer, wampservermysql

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

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.