I have deploy a Helloworld django App on Heroku, and a shared database is generated ,My DATEBASE_URL is postgres://sfbywaqhvj:_WgTgP660aDnYuS3aP3o@ec2-23-21-64-4.compute-1.amazonaws.com/sfbywaqhvj
Can I connect the db through navicat or other local DBMS? THX
Asked
Active
Viewed 3,842 times
4

okm
- 23,575
- 5
- 83
- 90

user996505
- 1,209
- 3
- 15
- 17
-
1you mean `DATABASE_URL` when saying `DATEBASE_URL`? – okm May 08 '12 at 05:19
-
Only need enable SSL. http://stackoverflow.com/questions/17377118/heroku-database-connection-properties/17377446#17377446 – McNally Paulo Jun 19 '14 at 16:12
-
you better remove the url of your db – Ernesto Alfonso May 15 '20 at 14:24
1 Answers
7
Assuming that's not a real Database URL you've posted and you're using the Heroku Shared 9.1 Beta addon (https://postgres.heroku.com/blog/past/2012/4/26/heroku_postgres_development_plan/ - which is the only shared DB that will let you connect externally you'd just split into the relevant parts
postgres://sfbywaqhvj:_WgTgP660aDnYuS3aP3o@ec2-23-21-64-4.compute-1.amazonaws.com/sfbywaqhvj
becomes
Username: sfbywaqhvj
password: _WgTgP660aDnYuS3aP3o
host: ec2-23-21-64-4.compute-1.amazonaws.com
database: sfbywaqhvj

John Beynon
- 37,398
- 8
- 88
- 97
-
6You also need to make sure that you're using SSL Mode = required. To do this go into Connection Properties, select the SSL tab, enable "Use SLL" and select "required" from the SSL Mode dropdown – Thanh Nguyen Jul 10 '13 at 18:41
-
`heroku pg:credentials` will list this information broken down into the required parts. – Alex Nov 18 '13 at 10:48