To configure phpMyAdmin, you need to find your config.inc.php
configuration file. On Ubuntu, this is located in /etc/phpmyadmin
. Edit this file.
Add lines to this file after the block that ends with $i++
.
To deny access to all users by default, and then allow specific users:
$cfg['Servers'][$i]['AllowDeny']['order'] = 'explicit';
$cfg['Servers'][$i]['AllowDeny']['rules'] = [
'allow alex from all'
];
To allow access to all users by default, and then deny specific users:
$cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
$cfg['Servers'][$i]['AllowDeny']['rules'] = [
'deny alex from all'
];
You can replace all
with patterns to match specific IP addresses or ranges of addresses. See the full documentation at the phpMyAdmin docs.