dongshu4755 2015-11-07 10:47
浏览 330
已采纳

未捕获的异常'PDOException with message'SQLSTATE [HY000] [2013]

I am trying to get my mysql db up and running on amazon rds however I am running into an issue. When trying to connect to my db via php from a remote server to pull information I am getting the following error.

Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 110'

And it points to the line that shows my dbhostname username password etc. What can I do to get past this error. The hostname etc seems to be fine as I can connect to the db using mysql workbench using the same credentials. What am I missing?

Note PDO and Mysql is installed on the remote php server

  • 写回答

1条回答 默认 最新

  • duane2364 2015-11-12 00:06
    关注

    Found out that this was an issue with the inbound of Firewall rules on my AWS RDS server. What made me think it was a firewall error is that the error referred to packets and losing connections. Also that the same code was working before and the PDO extensions not installed on PHP gave an entirely different error.

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

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器