This guide assumes you have a working installation of phpMyAdmin. Go ahead and install and return when it is working, if you don’t.
Before you get started, gather your:
- RDS Endpoint
- Username (view-able from Instance Actions> See Details> Configuration Details)
- Password (modifiable from Instance Actions> Modify> Settings> New Master Password)
Edit config.inc.php
First, you will need to edit your config.inc.php file to add or edit your Servers.
By default it is located
- Debian (& Raspbian): /etc/phpmyadmin/
- Windows (using Wamp Developer 5.4.0.1): C:\WampDeveloper\Tools\phpMyAdmin
Other possible locations:
- /usr/share/phpMyAdmin
- /usr/share/phpmyadmin
At the end of the file add your second server config:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$i++; $cfg['Servers'][$i]['verbose'] = 'Database Server 2'; $cfg['Servers'][$i]['host'] = 'xxxxxxxxxxxx.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com'; $cfg['Servers'][$i]['port'] = '3306'; $cfg['Servers'][$i]['socket'] = ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['compress'] = TRUE; $cfg['Servers'][$i]['auth_type'] = 'cookie'; |
- Name your server in verbose field
- Put your RDS Endpoint (without colon & port) in for host
- Ensure your port matches (by default it is 3306)
If you wish to save your credentials in the config file:
1 2 3 4 5 |
$cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'Your Username'; $cfg['Servers'][$i]['password'] = 'Your Master Password'; |
- Change auth_type to ‘config’
- Enter your Username
- Enter your Master Password
Save the config.inc.php file and open or refresh phpMyAdmin in your browser. You do not need to restart your web server.
Test your configuration
It should look like this:
Success!
Helpful hints:
Find your RDS Endpoint (this goes in the host variable)
Ensure your IP is authorized in the security group
- Security groups> Select your DB Security Group
- To add your IP select “CIDRP/IP” from the connection type, make sure “CIDR/IP iof your current machine” is your machine’s IP
- Click Authorize