Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password:

て烟熏妆下的殇ゞ 提交于 2019-12-01 06:18:59
Warning: mysqli_connect(): (HY000/1045):Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) inD:\xampp\php\includes\myfun2.phpon line 17
Error Access denied for user 'root'@'localhost' (using password: YES))
 inD:\xampp\php\includes\myfun2.phpon line 17

Error Access denied for user 'root'@'localhost' (using password: YES)



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

 phpMyAdmin 尝试连接到 MySQL 服务器,但服务器拒绝连接。您应该检查配置文件中的主机、用户名和密码,并确认这些信息与 MySQL 服务器管理员所给出的信息一致。

需要修改D:\xampp\phpMyAdmin\config.inc.php文件,具体内容如下:

$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['Servers'][$i]['auth_type'] = 'cookie';

就可了

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!