Remote connect to clearDB heroku database

前端 未结 13 1852
故里飘歌
故里飘歌 2020-11-30 18:26

How can i perform a remote connect to ClearDB MySQL database on heroku using for example MySQL Query Browser. Where to get url, port, login and password?

13条回答
  •  自闭症患者
    2020-11-30 18:51

    Go to your app on heroku and click to the 'settings' tab. Then click the button on the second option that says 'reveal config vars'.

    You should find, listed under the CLEARDB_DATABASE_URL variable, something like this...

    mysql://[username]:[password]@[host]/[database name]?reconnect=true

    So the [host portion] is your host. The [database name] portion is your db name, of course.

    You still need your username and password. Go back to the 'overview' tab in heroku. Go to the ClearDB add-on in your installed add-ons section. Click the database you want to access (probably only 1 option there). Click the 'system information' tab. You should see your username and password.

    that should be all you need to access your database. I use sequel pro. I just plugged that info (name, host, into the 'standard' tab and I was good to go.

提交回复
热议问题