2013-07-02 74 views
1

我一直在寻找解决这个问题的方法,但是无法获得任何地方。WampServer - 拒绝用户'root'@'localhost'的访问

所以我已经安装了WampServer并重新安装了好几次,现在,当我尝试加载localhost/phpmyadmin我得到这个错误:

#1045 - Access denied for user 'root'@'localhost' (using password: YES)

这也是我config.inc.php文件:

/* Server: localhost [1] */ 
$i++; 
$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; 

不知道该怎么做,如果我尝试加载mySQL控制台我也需要使用密码,我不知道如何解决。即使我重新安装程序,我也会遇到同样的错误。

回答

-1

Wamp通常没有MySQL密码。 尝试replacinng C:/wampdirectory/apps/phpmyadmin-versionthing/config.inc.php,与此版本: (只需删除当前文件的全部内容

<?php 
$cfg['blowfish_secret'] = 'a8b7c6d'; 
$i = 0; 
$i++; 
$cfg['Servers'][$i]['auth_type'] = 'cookie'; 
$cfg['Servers'][$i]['host'] = 'localhost'; 
$cfg['Servers'][$i]['connect_type'] = 'tcp'; 
$cfg['Servers'][$i]['compress'] = false; 
$cfg['Servers'][$i]['extension'] = 'mysqli'; 
$cfg['Servers'][$i]['AllowNoPassword'] = true; 
$cfg['UploadDir'] = ''; 
$cfg['SaveDir'] = ''; 

>

+1

?仍然得到相同的错误。 – germainelol

相关问题