使用PHPMyAdmin拒绝用户'root'@'localhost'的访问 [英] Access denied for user 'root'@'localhost' with PHPMyAdmin
本文介绍了使用PHPMyAdmin拒绝用户'root'@'localhost'的访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在PHPMyAdmin中设置root密码时,出现此错误:
When I set the root password in PHPMyAdmin, I get this error:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
我无法打开PHPMyAdmin面板.我在做什么错了?
I can't open the PHPMyAdmin panel. What am I doing wrong?
推荐答案
编辑您的phpmyadmin config.inc.php文件,如果您具有密码,则在以下代码中将其插入密码前面:
Edit your phpmyadmin config.inc.php file and if you have Password, insert that in front of Password in following code:
$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'@'localhost'的访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文