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!