Wampserver phpMyAdmin Unable to connect to database after modifying MySQL database password

Source: Internet
Author: User
Tags phpmyadmin

PhpMyAdmin started to open, but I changed the root password in the permissions, and then opened PhpMyAdmin to show: "PhpMyAdmin tried to connect to the MySQL server, but the server refused to connect. You should check the host, user name, and password in the config.inc.php and make sure that the information is consistent with the information given by the administrator of the MySQL server . "It is strange that I have already filled in the password in config.inc.php's $cfg[' Servers ' [$i] [' Password '], why not? And why does phpMyAdmin not have a login interface?

Here is my answer, Wanmpserve integrated environment after installation, MySQL password is empty, this used to know, then we modify the MySQL data password to make our database more secure, very simple to find the root directory of phpMyAdmin D:\wamp\apps \phpmyadmin3.3.9, find config.inc.php This file to open it, find this code can be modified

$cfg [' Servers '] [$i] [' auth_type '] = ' http '; (HTTP is config, the login interface will appear after HTTP is changed to phpMyAdmin)
$cfg [' Servers '] [$i] [' user '] = ' root ';
$cfg [' Servers '] [$i] [' password '] = ' your password ';

After changing the password above, I still have to change a place. That is the config.default.php file in the D:\wamp\apps\phpmyadmin3.3.9\libraries directory, found after open, Found it


$cfg [' Servers '] [$i] [' password '] = ' your password ';

(about 194 to 199 lines)

When you open your phpMyAdmin it will not appear "PhpMyAdmin tried to connect to the MySQL server, but the server refused to connect. You should check the host, user name, and password in the config.inc.php and make sure that the information is consistent with the information given by the administrator of the MySQL server. " these are unpleasant hints. Okay, OK, I hope you find something to solve your problem.

Wampserver phpMyAdmin Unable to connect to database after modifying MySQL database password

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.