打开wamp->apps->phpmyadmin目录下面的config.inc.php文件
cfg[‘Servers‘][$i][‘verbose‘] = ‘localhost‘;
$cfg[‘Servers‘][$i][‘host‘] = ‘localhost‘;
$cfg[‘Servers‘][$i][‘port‘] = ‘‘;
$cfg[‘Servers‘][$i][‘socket‘] = ‘‘;
$cfg[‘Servers‘][$i][‘connect_type‘] = ‘tcp‘;
$cfg[‘Servers‘][$i][‘extension‘] = ‘mysqli‘;
$cfg[‘Servers‘][$i][‘auth_type‘] = ‘config‘;
$cfg[‘Servers‘][$i][‘user‘] = ‘root‘;
$cfg[‘Servers‘][$i][‘password‘] = ‘‘;//定位到这行,如果数据库有密码,添加密码即可
$cfg[‘Servers‘][$i][‘AllowNoPassword‘] = true;
然后保存,重新刷新phpmyadmin页面,就OK了。。。
wamp出现问题#1045 - Access denied for user 'root'@'localhost' (using password: NO)的解决方法
时间: 2024-11-06 18:07:47