Xampp default mysql password settings, change the default empty mysql password XAMPP
Mysqlphpmyadminauthentication database management tool database extension
I have always used appserv for development in the past. appserv features one-click installation. during installation, users are required to enter the mysql root password. Today, I switched to xampp as my development environment, so I encountered the problem of modifying the default null password of mysql.
I read some help information provided on the Internet, which is so complicated that it is not necessary. In fact, my simple practices are basically the same. The following describes my methods:
Because the default mysql password after xampp is installed is blank, we can log on to phpmyadmin and enter http: // localhost/phpmyamdin in the browser address to enter the database control panel, then, select the mysql database name. the password of the two root users in the user table 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 example:
F:/xampp/phpMyAdmin/config. inc. php
Find the following code:
1 2 3 4 5 6 |
/* 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
1 2 3 4 5 6 |
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '123456';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
|
Continue to modify phpmyadmin local login settings, F:/xampp/phpMyAdmin/config. inc. php
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'config ';
Modify
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'cooker ';