更改为/etc/phpmyadmin/config.inc.inc.php没有效果
我想配置PhpMyAdmin,仅通过一个用户访问一个数据库。
我以前曾尝试使用此答案从2013年开始使用此答案来限制访问权限,但它无效:
块访问单个数据库
phpmyadmin 在此答案中说明:
phpmyadmin中的用户帐户?
,但它也无法正常工作。我继续访问所有用户。我已经阅读了文档,并在config.inc.php中重写了
$cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array(
'deny root from all',
'deny user1 from all',
'deny user2 from all',
'allow user3 from all',
);
user1和user2是用户的用户,而用户2是用户允许的。但是我仍然可以与所有用户访问。因此,我仅尝试了
$ cfg ['server'] [$ i] ['allydeny'] ['order'] ='equallicit';
应该阻止所有用户的访问,但是我仍然可以访问与所有用户。因此,我认为/etc/phpmyadmin/config.inc.php以某种方式被覆盖,因为没有变化有效,但我不明白如何。
关于检查哪里有任何想法吗?
I would like to configure PhpMyAdmin to access only one database through one user.
I tried before to restrict access via .htaccess using this answer from 2013 but it did not work:
phpMyAdmin Block Access to Single Database
I hence tried by adding deny,allow rules as stated in this answer:
How do I restrict access to specific database user accounts in phpMyAdmin?
But it did not work too. I continue to access all users. I have read the documentation and rewrote the lines in config.inc.php as
$cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array(
'deny root from all',
'deny user1 from all',
'deny user2 from all',
'allow user3 from all',
);
where user1 and user2 are users to deny, and user2 is user to allow. But I can still access with all users. I hence tried only
$cfg['Servers'][$i]['AllowDeny']['order'] = 'explicit';
that should block access to all users, but I can still access with all users. I hence believe that /etc/phpmyadmin/config.inc.php is being overwritten in some way, since no change has effect, but I do not understand how.
Any idea on where to check?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
就我而言,通过将PHP和PHPMyAdmin更新为最新版本来解决。 po,问题已经消失了
In my case, it is solved by updating PHP and PhpMyAdmin to the latest version. Poof, the problem is gone
看起来您允许访问所有用户,然后您再次尝试限制某些用户,似乎有些困惑。
正确的模式应拒绝访问所有用户,然后向特定用户提供明确的访问权限,
请参考官方文档
https://docs.phpmyadmin.net/en/latest/config.html# cfg_servers_allowdeny_order
正确的配置应该是这样的希望,
希望它对您有用!
Looks like you are allowing access to all users and then again you are trying to restrict some of the users, seems bit confusing.
The correct pattern should be deny access to all users and then provide explicit access to the specific user
Please refer the official document
https://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers_AllowDeny_order
The correct configuration should be something like this
hope it works for you!