4

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

okm
  • 23,575
  • 5
  • 83
  • 90
user996505
  • 1,209
  • 3
  • 15
  • 17

1 Answers1

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
  • 6
    You 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