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;