Xampp to modify the Mysql default null password (root password) method to share _mysql

Source: Internet
Author: User

Referring to some of the methods provided on the Internet, it is very complicated to find that. Here's a quick and easy way to share.

First, the information about the MySQL user is stored in the user table of the MySQL database, and the password field (Password) of the table is stored through the Password method.

Understand the above prompts, then modify the password is simple, run the following SQL statement directly (this will modify the password to jb51.net):

Copy Code code as follows:

UPDATE user SET Password=password (' jb51.net ') WHERE user= ' root ';



After the above operation, the password is modified.

If you want to enter the Localhost/phpmyadmin directly in the future can also go directly to the phpMyAdmin management interface without entering the username and password, you need to do the following:

Locate the phpMyAdmin configuration file, the config.inc.php in the phpMyAdmin directory, and locate the following code:

Copy Code code as follows:

/* 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;

Copy Code code as follows:

/* Authentication type and Info * *
$cfg [' Servers '] [$i] [' auth_type '] = ' config ';
$cfg [' Servers '] [$i] [' user '] = ' root ';
$cfg [' Servers '] [$i] [' password '] = ' jb51.net ';
$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.