Connect Heroku Postgres to Infograph
What it brings in: Every table and view the user can read.
What you need
- A Heroku Postgres database on a plan that is reachable from the internet. Private and Shield databases are not.
- Access to the database in your Heroku dashboard.
Your connection string
Each part is one thing you fill in, and each can fail on its own.
postgres://[user]user: fix for "The username or password was not accepted.":[password]password: fix for "The username or password was not accepted."@[host]host: fix for "We couldn't find that host. Check the host name, then try again.":5432port: fix for "The host refused the connection. Check the port, and that your database accepts connections from Infograph's address."/[dbname]database: fix for "That database does not exist on this server."Steps
Open your database's credentials
Open Datastores, or your app's Resources tab, and click your database. Then open the Credentials tab.
Copy the URI
Click Edit on a credential and copy the URI. Keep port 5432. Port 5433 is the connection pooler, which breaks syncing.
postgres://[user]:[password]@[host]:5432/[dbname]Paste it in Infograph and choose your tables
Open Heroku Postgres in Infograph, paste the string and press Connect. Pick the tables you want and Infograph starts loading them.
Allow 51.222.152.247 through your firewall so Infograph can connect.
Connect
Troubleshooting
Each entry is the message Infograph shows when a connection fails. Open it for the fix.
This host is not reachable from Infograph. Use your database's public address.
Private and Shield plan databases can only be reached from inside their Heroku space. Infograph cannot connect to them from outside.
We couldn't find that host. Check the host name, then try again.
Copy the URI again from the Credentials tab rather than typing the host.
The host refused the connection. Check the port, and that your database accepts connections from Infograph's address.
Check the port is 5432. Port 5433 is Heroku's connection pooler, which Infograph cannot use.
The server closed the connection. Check that it allows Infograph's address, and whether it requires an encrypted connection.
The server answered, then hung up before Infograph could sign in. Check it allows 51.222.152.247: some hosts close the connection rather than refuse it. If the server accepts only encrypted connections, set SSL Mode to Require under Advanced.
The host did not answer in time. Check the host and port, and that your firewall allows Infograph's address.
Check the host and port match the URI on the Credentials tab. Private and Shield plan databases cannot be reached from outside their space.
The username or password was not accepted.
Heroku can rotate credentials, for example after a failover. Copy the URI again from the Credentials tab and update the connection.
Those credentials were not accepted.
The credential may have been rotated or removed. Copy the current URI from the Credentials tab.
That database does not exist on this server.
Heroku names the database for you. Copy the URI again so the name after the last / is exact.