Example for IP address limited autologin ΒΆ
If you want to automatically login when accessing phpMyAdmin locally while asking for a password when accessing remotely, you can achieve it using following snippet:
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") { $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'yourpassword'; } else { $cfg['Servers'][$i]['auth_type'] = 'cookie'; }
Note
Filtering based on IP addresses isn't reliable over the internet, use it only for local address.