![](/img/trans.png)
[英]Fix Access denied for user 'root'@'localhost' for phpMyAdmin
[英]Access denied for user 'root'@'localhost' with PHPMyAdmin
當我在PHPMyAdmin中設置root密碼時,我收到此錯誤:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
我無法打開PHPMyAdmin面板。 我究竟做錯了什么?
編輯您的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;
以下是必須仔細遵循的幾個步驟
在C:\\ wamp \\ apps \\ phpmyadmin中創建一個名為config的文件夾,應用程序內的文件夾可能有不同的名稱,如phpmyadmin3.2.0.1
將身份驗證類型更改為“cookie”並將用戶名和密碼字段保留為空,但如果將身份驗證類型更改為“config”,請輸入用戶名root的密碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.