Xampp default mysql password settings, change the default blank mysql password _ MySQL

Source: Internet
Author: User
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 ';
Related Article

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.