wampmanager 3.1 启动数据库提示:#1045 – Access denied for user ‘root’@’localhost’ (using password: YES),登入不了数据库。
因为默认配置文件中mySQL的空的。所以我们需要修改一配置文件。修改wamp安装目录下的apps\phpmyadmin4.7.4下的config.inc.php文件。
if($wampConf['SupportMySQL'] == 'on') {
/* Server: localhost [1] */
$i++;
if($mariaFirst) $i++;
$cfg['Servers'][$i]['verbose'] = 'MySQL';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = $wampConf['mysqlPortUsed'];
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
https:// Hidden databases in PhpMyAdmin left panel
https://$cfg['Servers'][$i]['hide_db'] = '(information_schema|mysql|performance_schema|sys)';
https:// Allow connection without password
$cfg['Servers'][$i]['AllowNoPassword'] = true;
只需要修改默认user用户名,密码为空就可以了,user修改为:$cfg[‘Servers’][$i][‘user’] = ‘root’;
然后重启MySQL就可以了。
如果出现提示:#1045 – Accès refusé pour l’utilisateur: ‘root’@’@localhost’ (mot de passe: NON)