Search code examples
mysqlvue.jsflaskheroku

Deploy my Flask app to Heroku using my own MySQL server


I have a project with a Flask backend and Vue frontend. I want to deploy it to Heroku but using my own MySQL database from my own MySQL server, without using Heroku's dynos.

Is this possible?


Solution

  • That depends what you mean by

    my own MySQL database from my own MySQL server, without using Heroku's dynos

    If your MySQL server is accessible from the Internet, sure. Just point your application at it.

    (Note that using one of Heroku's database addons does not mean using dynos. These services run as hosted services on the cloud, not on your dynos. JawsDB and ClearDB are both options and both have free tiers.)

    If you're talking about something running inside a firewall, e.g. on your laptop, then this won't be possible without doing a bunch of network stuff. It's possible but I strongly urge you not to do this. It's easy to create security issues.