Heroku does not offer a native MySQL add-on but instead supplies it through a third party, ClearDB. If it has not been added to your application already, you can install it from the Heroku Add-Ons Page. Once installed, it will appear in your Add-Ons list in your Resources tab as
Click on the link to ClearDB MySQL in the image above and you will be taken to a new tab where you can see the name of your database listed. In this example, the database is called
Click on the name of the database and then choose the
System Information tab to see the username and password.
Neither the ClearDB on the Heroku GUIs provide this information. You will need to use the Heroku command line tool to query it. You can find instructions on how to install the CLI here. Once installed, type
heroku login to login using the browser. Next enter the following command, using your own app name instead of the one in this example.
heroku config -a arctype-db-test | grep CLEARDB_DATABASE_URL
The database URL string will be printed on the command line. The
Hostname is the part after the @ sign and before the
Finally, you can use any SQL client like Arctype to connect. Remember to select SSL because Heroku automatically encrypts connections to your database.
Click Test Connection and then Save and you are connected!