我试图让phpmyadmin up,当我尝试将它与xampp一起使用时,访问被拒绝。给出以下错误代码:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
phpMyAdmin尝试连接到MySQL服务器,服务器拒绝连接。您应该检查配置中的主机,用户名和密码,并确保它们与MySQL服务器管理员提供的信息一致。
我已阅读相关答案并尝试更改行
$cfg['Servers'][$i]['auth_type'] = 'config' to $cfg['Servers'][$i]['auth_type'] = 'cookie'
,但这并没有提供解决方案。伙计们好吗?我正在使用Windows 7.
这是当前的文件:
* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'HTTP';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'password';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';
/ * *服务器配置结束 * /
答案 0 :(得分:2)
选中此Link它可能有助于您解决问题。
1. Open config.inc.php file in the phpmyadmin directory
2. Find line 21: $cfg['Servers'][$i]['password'] = ''
3. Change it to: $cfg['Servers'][$i]['password'] = 'your_password';
4. Restart XAMPP
The setting you are looking for is "$cfg['Servers'][$i]['auth_type']" - set this to 'HTTP', and you will be able to input a username and password.