I have a remote Mysql database that I am connecting to through Node.js on Heroku. My MySql host (bluehost) wants me to input IP Adresses of all remote MySql connections.
Heroku doesn't have a dedicated IP for my app, so how can I connect to it? Bluehost mentions something about a Class C IP on its page, but I'm not sure Heroku has one...
Also, I believe I already have all of the heroku environment variables set up correctly:
heroku config:add EXTERNAL_DATABASE_URL=...)
Here's what blue host says about dynamic ip addresses:
Dynamic IP Addresses
Having a dynamic IP address means that the connecting IP address can change periodically depending on the Internet Service Provider (ISP). You must update the connecting IP in Remote MySQL every time it changes.
So at least each time you redeploy your application, you have a chance to get a different ip address. So this seems highly impractical. Why don't you use Heroku's MySQL offering?
This recipe can be found in it's original form on Stack Over Flow.