[英]Access denied for user 'root'@'localhost' with PHPMyAdmin
When I set the root password in PHPMyAdmin, I get this error: 当我在PHPMyAdmin中设置root密码时,我收到此错误:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
I can't open the PHPMyAdmin panel. 我无法打开PHPMyAdmin面板。 What am I doing wrong?
我究竟做错了什么?
Edit your phpmyadmin config.inc.php file and if you have Password, insert that in front of Password in following code: 编辑您的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;
Here are few steps that must be followed carefully 以下是必须仔细遵循的几个步骤
Create a folder named config inside C:\\wamp\\apps\\phpmyadmin, the folder inside apps may have different name like phpmyadmin3.2.0.1 在C:\\ wamp \\ apps \\ phpmyadmin中创建一个名为config的文件夹,应用程序内的文件夹可能有不同的名称,如phpmyadmin3.2.0.1
Return to your browser in phpmyadmin setup tab, and click New server. 在phpmyadmin设置选项卡中返回浏览器,然后单击“新建服务器”。
Change the authentication type to 'cookie' and leave the username and password field empty but if you change the authentication type to 'config' enter the password for username root. 将身份验证类型更改为“cookie”并将用户名和密码字段保留为空,但如果将身份验证类型更改为“config”,请输入用户名root的密码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.