微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用PHPMyAdmin拒绝用户'root'@'localhost'的访问

如何解决使用PHPMyAdmin拒绝用户'root'@'localhost'的访问

编辑您的PHPmyadmin config.inc.PHP文件,如果您有密码,请在以下代码中将其插入密码前面:

$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '3306';
$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'] = '**your-root-username**';
$cfg['Servers'][$i]['password'] = '**root-password**';
$cfg['Servers'][$i]['Allownopassword'] = true;

解决方法

当我在PHPMyAdmin中设置root密码时,出现以下错误:

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

我无法打开PHPMyAdmin面板。我究竟做错了什么?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。