AWS RDS is awesome. But it doesn’t come with a database management tool. All the searching results pointed to this tutorial from Ben Kuhl.
A short summary: First setup your phpMyAdmin on EC2.
Then in the config.inc.php file, add the following line after the existing server setup or setup loop:
$cfg['Servers'][$i]['auth_type'] = 'HTTP'; $cfg['Servers'][$i]['hide_db'] = '(mysql|information_schema|phpmyadmin)'; /* Server parameters */ $cfg['Servers'][$i]['host'] = 'xxxxx.l2kj35ncj3.us-east-1.rds.amazonaws.com';
PHPMyAdmin uses $cfg[‘Servers’][$i] so that it can support multiple servers on one installation. Having more than 1 server will give you the option to select a server when you login. After that last } you’ll want to add the following code, but of course with your own Amazon RDS instance URL.
In my case, I don’t have a config.inc.php file, so I made a copy from the config.sample.inc.php, and here is what it looks like now:
/* * Servers configuration */ $i = 0; /* * First server */ $i++; /* Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'cookie'; /* Server parameters */ $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; /* Select mysql if your server does not have mysqli */ $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = false; /* * AWS RDS server */ $i++; $cfg['Servers'][$i]['auth_type'] = 'HTTP'; $cfg['Servers'][$i]['hide_db'] = '(mysql|information_schema|phpmyadmin)'; /* Server parameters */ $cfg['Servers'][$i]['host'] = 'xxx.rds.amazonaws.com';
Then… it works like a charm!
Salute to Ben Kuhl!