dongsha9208 2012-10-09 17:55
浏览 41
已采纳

从Heroku外部连接到cPanel服务器上的MySQL数据库?

I am using the Heroku app to host a facebook application since Facebook is changing how they have their applications set up, again. However I need to connect to the MySQL Externally from my cPanel VPS and I am not able to connect correctly. I have tried using the darkprospect.net(host domain), ultimate-battle-online.com (primary domain of user) and 184.154.20.170 as well as those plus the combination of added port 3306 and none have worked. I previously needed to make sure that I added the right domain to the right file but right now it's just not connecting. Right now get this error when using mysql_connect() function:

Lost connection to MySQL server at 'reading initial communication packet', system error: 110

Again, thank you for any ideas that you may have!

EDIT: I found out that it was an issue with the buildpack that is the default for PHP apps, since I develop on a VPS with PHP 5.4.7 I was using parameters that were tuned for it and were not very supportive on their bundle of vanilla PHP and Apache.

  • 写回答

1条回答 默认 最新

  • dsjmrpym220113739 2012-10-10 15:55
    关注

    I was able to create a new Heroku buildpack that was able to support all of the features that my application was needing. Because I was developing on my VPS in PHP 5.4.7 my configurations were designed for more of the new features and with the Heroku's basic Buildpack only having PHP 5.3.10 there were unseen errors in background logs that were halting the connection process. Additionally CSF Firewall was configured only for UDP income 3306 and I was able to add it to UTP as well and that seemed to resolve the Connection Timed Out error that was the final error after I made a better buildpack for myself.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分