Home > Article > Backend Development > http://localhost/phpmyadmin/ 拒绝访问是咋回事?
http://localhost/phpmyadmin/ 拒绝访问是怎么回事??
我装的wampserver ,http://localhost可以打开,但是打开http://localhost/phpmyadmin/时,出现下面的情况
是为什么???
wampserver 是刚装的,mysql的初始密码没有改,就是空。
config.inc.php文件中的数据也和mysql对应,如下
$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;//允许空密码
这个你设置了吗?
------解决方案--------------------
libraries/common.inc.php 的886行
------解决方案--------------------
刚才没注意!
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
显然你的 root用户是有口令的