xampp访问被拒绝用户'pma'@'localhost'(使用密码:NO)

时间:2018-06-13 04:49:52

标签: phpmyadmin xampp

我的phpmyadmin用于加载,但有以下错误。尚未找到解决方案。请告诉我我能做些什么,谢谢你的时间和帮助。

现在它加载一个空白页面。

我按下了sql选项并传递了以下命令 - set password for root@localhost = password('something');

然后我配置了phpmyadmin config.inc.php文件,将'auth_type'前面的'config'替换为'cookie',并在我的下面添加我的密码。那是我的phpmyadmin开始空白的时候。之后我在pma下面的'controlpass'前面的空白''中添加了我的密码。没有帮助。我将其更改回默认设置,但它仍无法正常工作。

xampp Access denied for user 'pma'@'localhost' (using password: NO) xampp Access denied for user 'pma'@'localhost' (using password: NO)

<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xamppxamppxamppxamppxamppxamppxampp';
/* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;
/*
 * First server
 */
$i++;
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'bananashake';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$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';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';

/*
 * End of servers configuration
 */
?>

2 个答案:

答案 0 :(得分:2)

根据您在评论中发布的最新信息,似乎phpMyAdmin正在连接到您预先存在的MySQL安装。要连接到XAMPP MySQL DB,请将更改还原为配置。 (即auth_type = 'config'

并将此行添加到您的phpMyAdmin config.inc.php

$cfg['Servers'][$i]['port'] = '3306'; //Change 3306 to the port number of your XAMPP MySQL

答案 1 :(得分:0)

这个错误有时也发生在我身上。这次我尝试了另一个浏览器,它运行良好! ...所以我清除了网站数据并修复了该问题。 因此在执行任何其他解决方案之前,请先尝试清除站点数据。希望它能解决。