phpmyadmin - 用户'pma'@'localhost'的xampp访问被拒绝(使用密码:否)
问题描述
我的 phpmyadmin 曾经加载但出现以下错误。还没有找到解决方案。请让我知道我能做什么,感谢您的时间和帮助。
现在它加载一个空白页面。
我按下了 sql 选项并通过了以下命令 -set password for root@localhost = password('something');
然后我通过将 'auth_type' 前面的 'config' 替换为 'cookie' 并将我的密码添加到它下面的空 '' 中来配置 phpmyadmin config.inc.php 文件。那是我的 phpmyadmin 开始空白的时候。之后,我在 pma 下的 'controlpass' 前面的空 '' 中添加了我的密码。没有帮助。我将其更改回默认设置,但仍然无法正常工作。
用户'pma'@'localhost'的xampp访问被拒绝(使用密码:否)
<?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
*/
?>
解决方案
根据您在评论中发布的最新信息,似乎 phpMyAdmin 正在连接到您预先存在的 MySQL 安装。要连接到您的 XAMPP MySQL 数据库,请还原对配置的更改。(即auth_type = 'config'
)
并将这一行添加到您的 phpMyAdminconfig.inc.php
$cfg['Servers'][$i]['port'] = '3306'; //Change 3306 to the port number of your XAMPP MySQL
推荐阅读
- sql - 视图与索引视图或物化视图之间的区别
- simulation - 如何使用模拟时间来触发模块中的动作?
- java - 如何确定测试是在本地运行还是在远程服务器上运行
- php - 使用 /blogo/testing-view_5.html 清理 url,所有 php 文件都是 .html .htaccess
- c# - 如何在 ASP.NET MVC 存储库模式中使用“Sql in”
- couchbase - Couchbase 创建了巨大的 GSI 索引文件
- java - Tomcat 错误 java.lang.ClassCastException:
- javascript - 带有 javascript 的 Asp 更新面板
- c# - c# OpenFileDialog 位置不可用
- php - json格式的菜单树结构