How to make connection to heroku mysql database
https://stackoverflow.com/questions/32109099/how-to-make-connection-to-heroku-mysql-database
Last updated
Was this helpful?
https://stackoverflow.com/questions/32109099/how-to-make-connection-to-heroku-mysql-database
Last updated
Was this helpful?
Asked 4 years, 5 months agoActive Viewed 747 times1
I created a web app that I was able to successfully deploy to heroku. The site uses a mysql database that I dumped into the project directory for the app. I followed the instructions from as well as other online sources. I entered the following command into the terminal:
and got the CLEARDB_DATABASE_URL: mysql://be4beb15e4506b:f601032d@us-cdbr-iron-east-02.cleardb.net/heroku_e665c17e181f638?reconnect=true
Before deploying the app I then entered:
Inside of the actual files, I added the following code for the database connection:
For some reason whenever I navigate to a page where a query is done, I'm getting a connection error. Based on the url provided, have the correct arguments been passed to the connection? ♦111 silver badgeasked Aug 20 '15 at 3:292,11911 gold badge2121 silver badges5454 bronze badges
I found the answer on server fault –
The correct format for the database connection is:
1
I found the answer on server fault