How to change the default mysql null password (root password) in xampp _ MySQL

Source: Internet
Author: User
How to change the default mysql null password (root password) in xampp

I have referred to some methods provided on the internet and found that they are quite complicated. We will share with you a simple and quick method.

First, the mysql user information is saved in the user table of the mysql database, and the Password field of the table is encrypted and stored using the PASSWORD method.

Once you understand the above prompts, you can simply change the password and directly run the following SQL statement (here, change the password to bitsCN.com ):


UPDATE user SET password = PASSWORD ('bitscn. com') WHERE user = 'root ';



After the above operations, the password is changed.

If you want to directly enter localhost/phpMyadmin and go to the phpMyadmin management interface without entering the user name and password, perform the following operations:

Find the phpMyadmin configuration file, that is, config. inc. php under The phpMyAdmin directory, and find the following 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;


/* Authentication type and info */
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'config ';
$ Cfg ['servers'] [$ I] ['user'] = 'root ';
$ Cfg ['servers'] [$ I] ['password'] = 'bitscn. com ';
$ Cfg ['servers'] [$ I] ['extension'] = 'mysql ';
$ Cfg ['servers'] [$ I] ['allownopassword'] = true;

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.