gpt4 book ai didi

php - 隐藏数据库在 phpMyAdmin 中创建两个本地主机服务器

转载 作者:太空宇宙 更新时间:2023-11-04 12:17:05 26 4
gpt4 key购买 nike

我在 config.inc.php 中添加了这一行以隐藏 phpMyAdmin 中的数据库:

$cfg['Servers'][$i]['hide_db'] = 'information_schema|performance_schema|mysql|phpmyadmin';

但是现在我在登录时得到了两个名为 localhost 的服务器的列表:

enter image description here

其中一个显示所有数据库。另一个只显示未隐藏的数据库。

我怎样才能像以前一样摆脱这个下拉选择?

最佳答案

很可能您以某种方式增加了$i,使phpMyAdmin 认为您打算拥有两台服务器而不是一台。您可以编辑您的帖子以包含整个 config.inc.php(混淆任何敏感信息),我们会查看它,但大多数情况下这是通过无意的复制和过去发生的,例如:

<?php
$cfg['blowfish_secret'] = 'ireallylikemysportsteamandhopetheywin';

$i = 0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$i++;
$cfg['Servers'][$i]['AllowNoPassword'] = false;

在这种情况下,第二个 $i++; 不应该存在。

关于php - 隐藏数据库在 phpMyAdmin 中创建两个本地主机服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47144334/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com