我真的需要帮助来修复这个错误,因为下星期一是我最后一年的项目演示,请。我不知道怎么解决这个问题。
我试着遵循这个http://www.ishaanrawat.com/solved-wampserver-1045-access-denied-for-user-rootlocalhost-using-password-no/指令,但是我也得到了同样的错误。
而且,几分钟前,我卸载了wamp服务器,希望在重新安装它之后,我可以正常使用我的wamp服务器,但仍然是相同的错误。
以下是错误:
MySQL说:文档
1045 -用户'root'@'localhost‘的访问被拒绝(使用密码:否)
phpMyAdmin试图连接到MySQL服务器,而服务器拒绝了连接。您应该检查配置中的主机、用户名和密码,并确保它们与MySQL服务器管理员提供的信息相对应。
发布于 2014-05-27 11:45:17
你可以看着解决你的问题
http://www.youtube.com/watch?v=BgcW4h6ZAro&t=7m21s
p/s:这是越南视频:)
在config.inc.php中,您可以编辑折叠代码:
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
//uncomment this
$cfg['Servers'][$i]['auth_type'] = 'cookie';
//comment this
//$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;然后退出wampserver,重新打开wampserver,打开PHPMyadmin,您将显示登录表单:)
发布于 2016-12-21 06:43:22
转到XAMPP或WAMPS服务器中的phpMyAdmin文件夹并打开config.inc.php文件。并将用户名和密码更改为在db中设置。
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';发布于 2015-12-09 06:39:36
这对我有用。在安装WAMP之前,我在我的计算机中安装了MySQL。打开MySQL命令行客户端所需的密码是,比方说“-”。现在,在安装WAMP之后,当我尝试打开phpMyAdmin时,它给出了与您相同的错误。如何解决这个问题:
$cfg['Servers'][$i]['AllowNoPassword'] = true;”改为“$cfg['Servers'][$i]['AllowNoPassword'] = false;”。$cfg['Servers'][$i]['password'] = ''”改为“$cfg['Servers'][$i]['password'] = 'pw'”。(请记住输入密码而不是“pw”)。https://stackoverflow.com/questions/23883163
复制相似问题