sparkandshine sparkandshine - 4 months ago 9x
MySQL Question

How do I get the database url of AWS EC2 MySQL?

I would like to import gtfs files into mysql by using a tool from github, runing the follwoing command:

gtfsdb-load --database_url <db url> <gtfs file | url>

How can I get the
of mysql located in AWS EC2?


If you're running MySQL on AWS EC2 as an RDS instance, your database_url will be the RDS instance name (followed by :port of course).

See for more info, but this is normally of the form (where us-east-1 is the region in this example but might vary depending on your setup).

Alternatively, if you're running your own MySQL installation on an EC2 instance, you'll need to use your instance's public IP address or external DNS hostname. See for more info on this. If you're doing this, you will have to have permitted ingress to your instance on the MySQL port, using Security Groups.