search

Home  >  Q&A  >  body text

Modifications to /etc/phpmyadmin/config.inc.php have not taken effect

I want to configure PhpMyAdmin to access only one database with one user.

I have previously tried to restrict access via .htaccess using this answer from 2013 with no success:

phpMyAdmin blocks access to a single database

So I tried adding deny, allow rules as mentioned in this answer:

How to restrict access to a specific database user account in phpMyAdmin?

But it doesn't work either. I continue to access all users. I've read the documentation and rewritten the lines in config.inc.php to

$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 the users to be denied, and user2 is the user to be allowed. But I still have access with all users. So I just tried

$cfg['Server'][$i]['AllowDeny']['order'] = 'Explicit';

This should block access for all users, but I still have access to all users. So I believe /etc/phpmyadmin/config.inc.php is being overwritten somehow since no changes are taking effect, but I don't understand how.

Know where to check?

P粉529581199P粉529581199319 days ago395

reply all(1)I'll reply

  • P粉877719694

    P粉8777196942024-01-17 00:45:36

    In my case, it was solved by updating PHP and PhpMyAdmin to the latest version. Poof, the problem is gone

    reply
    0
  • Cancelreply