How to change the default password of mysql using xampp

Source: Internet
Author: User

Here, we will introduce the general process of modifying the default mysql password of xampp by using phpmyadmin of xampp to change the mysql password. Then, we will change the phpmyadmin password in xampp, in this way, the default mysql password is completely modified.

Rough Process

Set Password in mysql open IE enter URL localhostphpadmin, click the user to see a root user, pull down, find the place to change the password, enter the password, and perform the operation, finally, go to your xampp installation directory and find the phpadmin folder. inc. after the PHP file is opened, find the mysql configuration and change config to cookie. Set the password to the password you just set.

Method

Enter http: // localhost/phpmyamdin in the browser address to enter the Database Control Panel, and select the database name as mysql. The user table is displayed, the password of the two root users is empty.

You can manually edit the password of the root user in the database. Click "edit" or "edit" to edit the password. For example, if the password is 123456, enter "* 6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9" (excluding quotation marks)

As shown in figure

If you want to change the password to another one, you can directly execute the SQL statement in the west and change new_password to your own password:

1 UPDATE user SET password=PASSWORD('new_password') WHERE user='root';

In addition, since the mysql root User password has been modified, the corresponding password configuration in phpmyadmin should also be modified. Find the configuration file, as shown in my

F: xamppphpMyAdminconfig. inc. php

Find the following code:

The Code is as follows: Copy code

Authentication type and info */$ cfg ['servers'] [$ I] ['auth _ type']
= 'Config'; $ cfg ['servers'] [$ I] ['user']
= 'Root'; $ cfg ['servers'] [$ I] ['Password']
= ''; $ Cfg ['servers'] [$ I] ['extension']
= 'Mysql'; $ cfg ['servers'] [$ I] ['allownopassword']
= True;

Change

The Code is as follows: Copy code


Authentication type and info */$ cfg ['servers'] [$ I] ['auth _ type']
= 'Config'; $ cfg ['servers'] [$ I] ['user']
= 'Root'; $ cfg ['servers'] [$ I] ['Password']
= '000000'; $ cfg ['servers'] [$ I] ['extension']
= 'Mysql'; $ cfg ['servers'] [$ I] ['allownopassword']
= True;

In this case, you need to restart phpmyadmin.

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.