First, here’s the setup:
AWS EC2 instance is up and running. Port 22,80, and 3306 have been added to the Security Groups
RDS DB Instance is up and running. My local IP was added as a CIDR/IP connection. AWS Account ID was added as a EC2 Security Group connection.
It’s a little odd to me that the regions are different. RDS is US East(N. Virginia), EC2 is US West (Oregon).
My local database was successfully imported to RDS. I used the command line like this:
C:\xampp\mysql\bin>mysqldump -u root 'local database' | mysql -- host='Endpoint' -- user='user login' --password='user pwd' ' rds database'
I am also using MySQL Workbench to connect and query the database on rds.
I never did import my backup sql file (‘localhostdatabase.sql’) to rds.
Here is how I am connecting:
(Both options are not working.)
// $serverConnect = mysql_connect('rds endpoint','rds admin','rds pwd');
// $serverConnect = mysql_connect('EC2 elastic ip','rds admin', 'rds pwd');
You can see the error when you click the ‘Demo’ button at http://www.realcardio.com
Do I need to configure a php file? If so, how do I do this?
My web files are stored at /var/www/html. But I don’t know where the php config files are located.
I use WinSCP to connect to EC2. How do I connect to RDS if I need to modify the files here?
I’ll troubleshoot and share anything with you. Just want to get this up and running.
I appreciate any help!
DK
Ok, there’s a number of issues here so I’ll try to get through all of them: