Local PhpMyAdmin Used to Access Remote Databases

Accessing and managing a remote MySQL database from a “localhost” phpMyAdmin is very simple.



Four things are required –

1. The remote MySQL server must be listening on a publicly accessible IP address (usually my.ini has MySQL bounded to – which will not see outside connections). Some cloud-based VM providers might also require you to connect public:3306 to private:3306 (i.e., “endpoints” on Azure).

2. The remote MySQL user account has to have its ‘Host’ field set to either “%” (means any IP can connect) or to your public IP address. This account also has to have at least the minimum set of permissions (‘SELECT‘ vs. ‘ALL‘) granted on the database(s) you need access to (e.g.,GRANT ALL PRIVILEGES ON `database`.* TO 'user-name'@'%';).

3. The remote server’s firewall should be configured to allow inbound and outbound port 3306 TCP connections.

4. The local computer needs to have a fully working phpMyAdmin environment installed (such as WAMP-Developer Pro).

Connecting phpMyAdmin to Remote Server

Edit phpMyAdmin’s configuration file (\WampDeveloper\Tools\phpMyAdmin\config.inc.php), and at the end of it, before the ending ?> line, add in –

/* Remote Server */
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host'] = 'myinstance.123456789012.us-east-1.rds.amazonaws.com';
$cfg['Servers'][$i]['verbose'] = 'Remote Server Name';
$cfg['Servers'][$i]['user'] = '**********';
$cfg['Servers'][$i]['password'] = '**********';
$cfg['Servers'][$i]['hide_db'] = '^(mysql|performance_schema|innodb|information_schema)$';

Update for the host (address of remote server), server name (can be anything – used as display name), and the MySQL’s account user + password info. Do not modify anything else in the config.inc.php file. Save file.

Afterwards –

Access the localhost phpMyAdmin:

Login with user:


Select from the “Current Server” drop-down:

Remote Server Name

phpMyAdmin will do the rest, using the provided info to establish a connection to the remote host/server, and manage the remote database(s) as if they where local.

phpMyAdmin Remote Server

phpMyAdmin Remote Database

One Comment

  1. remote access June 9, 2017 Reply

Add a Comment

Your email address will not be published. Required fields are marked *