简体   繁体   English

如何从Heroku访问远程MySQL数据库?

[英]How to access remote MySQL database from Heroku?

We have a legacy application running in a shared hosting service (JustHost). 我们有一个在共享托管服务(JustHost)中运行的旧应用程序。 Due to which I am not able to write any newer technology apps easily. 因此,我无法轻松编写任何新技术的应用程序。

I have created a test heroku app to talk to the MySQL database that is in the remote server. 我已经创建了一个测试heroku应用程序来与远程服务器中的MySQL数据库进行通信。 I have followed the steps from the Heroku side, with respect to adding the remote db url, etc. 我已经从Heroku方面遵循了有关添加远程数据库url等的步骤。

But my hosting service allows remote access only from whitelisted IP address (as it should). 但是我的托管服务仅允许从列入白名单的IP地址进行远程访问(应该如此)。 How does one get a public IP (or IP range) for a Heroku app? 如何获得Heroku应用的公共IP(或IP范围)?

您可以尝试使用具有静态IP的某种代理节点,以安全地与您的Heroku应用进行通信

Did you try to search heroku addons for providing static IP? 您是否尝试搜索heroku插件来提供静态IP? or try this one https://devcenter.heroku.com/articles/quotaguardstatic 或尝试这个https://devcenter.heroku.com/articles/quotaguardstatic

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM