要限制PHPMyAdmin的IP登录,您需要进行以下操作:

  1. 打开phpMyAdmin的config.inc.php文件。

  2. 找到以下行:

$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

  1. 在此行下面添加以下行:

$cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['AllowRoot'] = FALSE; $cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow'; $cfg['Servers'][$i]['AllowDeny']['rules'] = array( 'deny IP_ADDRESS', 'allow all' );

  1. 将'IP_ADDRESS'替换为要禁止访问phpMyAdmin的IP地址。

  2. 保存文件并重新启动Web服务器。

现在,只有在允许的IP地址上才能访问phpMyAdmin。

如何限制PHPMyAdmin的IP访问