Introduced here XAMPP modified MySQL default password of the approximate process is to use the XAMPP phpmyadmin to change the MySQL password, modified after we modify the XAMPP phpmyadmin password, so that the full change of MySQL default password.
Approximate process
Set the password in MySQL to open IE input URL localhostphpadmin, point users see the root user, pull down, find the place to change the password, enter the password, perform the operation, and finally go to the XAMPP installation directory in your phpadmin to find the folder, Open the Find config.inc.php file, open the find about the MySQL configuration to change config to cookie where the password is the password you just set it.
Specific methods
Enter Http://localhost/phpmyamdin on the browser address into the database Control Panel, and select the name of the MySQL database, you can see from the user table, root of the two user password is empty.
We can manually edit the root user's password in the database. Click Quick Edit, or edit can edit password, such as password: 123456, then fill in "*6bb4837eb74329105ee4568dda7dc67ed2ca2ad9" (except quotation marks)
After editing as
If you want to change the password to another, you can directly execute the west of the SQL statement, the new_password changed to their own password can be:
1 |
UPDATE user SET password=PASSWORD( ‘new_password‘ ) WHERE user= ‘root‘ ; |
In addition, since MySQL root user password has been modified, then the corresponding password configuration in the phpMyAdmin also to be modified to find the configuration file, such as mine is
f:mppphpmyadminconfig.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; |
Revision changed to
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 '] = ' 123456 '; $cfg [' Servers '] [$i] [' extension '] = ' MySQL '; $cfg [' Servers '] [$i] [' Allownopassword '] = true;
|
This will require you to restart the login phpMyAdmin.
XAMPP modifying MySQL default password