【问题标题】:phpmyadmin: "Cannot connect: invalid settings.", but only for 'users' tabphpmyadmin:“无法连接:无效设置。”,但仅适用于“用户”选项卡
【发布时间】:2013-08-02 02:17:08
【问题描述】:

所以我在连接到我的 phpmyAdmin 服务器时遇到了问题,但是我通过编辑 PMA 文件夹中的 config.inc.php 文件并将我的用户名更改为 root 并将密码更改为 root 来解决它,所以它现在看起来像这样:

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';

这一切都很好,我的网站使用相同的凭据以类似的方式连接到数据库。问题是,我无法访问 PHPMyAdmin 界面中的“用户”选项卡——我把这个错误集中在一个可爱的红色对话框中:

MySQL said:
Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the 
connection. You should check the host, username and password in your 
configuration and make sure that they correspond to the information given 
by the administrator of the MySQL server.

我知道这很荒谬,因为我可以完全访问所有数据库和设置,而且我的凭据是正确的。有谁知道这是为什么?

请注意,我在 Windows 环境中运行 XAMPP 3.1.0、Apache 2.4.7 和 MySQL 5.5.27。

【问题讨论】:

    标签: php mysql phpmyadmin xampp credentials


    【解决方案1】:

    您是否为数据库创建了新用户?您应该避免使用 root 用户并为每个数据库创建一个新用户,并改用该用户。

    【讨论】:

      猜你喜欢
      • 2016-07-10
      • 2016-10-10
      • 2021-09-04
      • 2017-06-19
      • 2015-12-31
      • 2019-05-26
      • 1970-01-01
      • 1970-01-01
      • 2017-04-20
      相关资源
      最近更新 更多