Connecting to the Database
The database that holds the billing information is hosted on the same instance that the service is on, so we will need the PublicDNS. We will also need to set the database password.
Note: Make sure that the EC2 security group allows tcp port 5432 for the appropriate IP block. See Create an EC2 Security Group for more details.
We are using a PostgreSQL and the connection information is:
- host
- PublicDNS
- database name
- billing
- username
- billing_viewer
- password
- billing_viewer_password
ODBC
See Setting Up a Microsoft Windows ODBC Connection
JDBC
The driver class is org.postgresql.Driver
and the jdbc url will look like jdbc:postgresql://PublicDNS/billing
. If you go to http://PublicDNS/rest/v1/connectionInfo it will give the literal jdbc url for the host.
Command Line
Console - user@hostname ~ $
1
psql -h PublicDNS -U billing_viewer billing
Give billing_viewer_password
when prompted for the password.