Home  >  Article  >  Database  >  What should I do if phpMyAdmin cannot connect to MySQL?

What should I do if phpMyAdmin cannot connect to MySQL?

angryTom
angryTomOriginal
2020-03-14 10:51:524493browse

What should I do if phpMyAdmin cannot connect to MySQL?

What should I do if phpMyAdmin cannot connect to MySQL

What should I do if phpMyAdmin cannot connect to MySQL?

##Solution:

1. First, we enter the phpmyadmin directory and see if there is a configuration file config.inc.php. If not, copy and rename config.sample.inc.php to config.inc.php;

2. Then open the configuration file, search for localhost, and find $cfg['Servers'][$i]['host'] = 'localhost;

3. Change localhost to 127.0.0.1;

$cfg['Servers'][$i]['host'] = 'localhost';

was modified to:

$cfg['Servers'][$i]['host'] = '127.0.0.1';

PHP Chinese website, a large number of

MySQL video tutorials, welcome to learn!

The above is the detailed content of What should I do if phpMyAdmin cannot connect to MySQL?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn