【问题标题】:phpMyAdmin - auth_type 'config' not workingphpMyAdmin - auth_type 'config' 不起作用
【发布时间】:2018-08-19 01:09:01
【问题描述】:

在 Windows 10 机器上,我有一个带有 Ubuntu 16.04 LTS 的本地 VB。

我已经安装了 phpMyAdmin 包,它适用于默认的 auth_type=cookie。

$cfg['Servers'][$i]['auth_type'] = 'cookie';

但是,当我尝试编辑 /etc/phpmyadmin/config.inc.php 并将 auth_type 更改为“config”(以及使用我的根凭据)时,

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'rootroot';

我得到这张图片:

Ubuntu 版本有限制吗?也许有人知道。真的不想调试源代码。

提前致谢!

更新: 凭证是正确的,用 mysql -u root -p 检查它们 这是 $cfg 的整个 print_r。

Array ( [blowfish_secret] => l2WkFOENKtuMAyJ7IR3m2JsU [Servers] => Array ( [1] => Array ( [auth_type] => config [host] => localhost [extension] => mysqli [controluser] => root [controlpass] => rootroot [pmadb] => phpmyadmin [bookmarktable] => pma__bookmark [relation] => pma__relation [table_info] => pma__table_info [table_coords] => pma__table_coords [pdf_pages] => pma__pdf_pages [column_info] => pma__column_info [history] => pma__history [table_uiprefs] => pma__table_uiprefs [tracking] => pma__tracking [userconfig] => pma__userconfig [recent] => pma__recent [favorite] => pma__favorite [users] => pma__users [usergroups] => pma__usergroups [navigationhiding] => pma__navigationhiding [savedsearches] => pma__savedsearches [central_columns] => pma__central_columns [designer_settings] => pma__designer_settings [export_templates] => pma__export_templates ) ) ) 

【问题讨论】:

  • 据我所知,Ubuntu 没有限制。问题很可能是您的配置文件中的连接信息错误,就像消息中所说的那样。在配置文件中发布您更改以设置连接的详细信息(主机、端口、用户名等;显然您可能希望编辑密码!)另外,尝试使用您认为应该使用的详细信息进行连接,使用来自的mysql Ubuntu 中的命令行以确保它们是正确的。
  • 检查过,它们是正确的。

标签: php mysql ubuntu phpmyadmin ubuntu-server


【解决方案1】:

controlusercontrolpass 是(可选)configuration storage 区域的凭据。实际的数据库连接用户名和密码配置选项分别称为userpassword

【讨论】:

  • 在哪里可以找到和更改它们?
  • @Denis 与您放置 controlusercontrolpass 的位置相同。检查the documentation
  • 手动将它们添加到配置文件(它们之前不存在)解决了这个问题。干杯!
猜你喜欢
  • 2013-09-05
  • 2017-05-16
  • 2014-09-25
  • 2013-12-02
  • 1970-01-01
  • 1970-01-01
  • 2013-08-26
  • 2016-04-13
  • 1970-01-01
相关资源
最近更新 更多