Mysql Communications link failure 终级解决办法

1、编辑my.cnf  在[mysqld] 下面添加

  wait_timeout=31536000
  interactive_timeout=31536000

2、在连接URL上添加参数:&autoReconnect=true&failOverReadOnly=false 

 

3、有可能是网络原因、数据库只能是某一个网才能访问

posted @ 2019-06-26 16:22  咸蛋超人、  阅读(8010)  评论(0编辑  收藏  举报