mysql数据库问题java问题

我感觉是mysql数据库问题,那个懂数据库的来告诉告诉我

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
关于这个问题,需要数据库调配置吗

#贴下源码,这样其他人才可以帮你分析一下

一般造成这个异常的情况有很多种,下面就简单的提示一些,希望对你有帮助。

  • IP address or hostname in JDBC URL is wrong.
  • Hostname in JDBC URL is not recognized by local DNS server.
  • Port number is missing or wrong in JDBC URL.
  • DB server is down.
  • DB server doesn't accept TCP/IP connections.
  • DB server has run out of connections.
  • Something in between Java and DB is blocking connections, e.g. a firewall or proxy.

参考文章

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure