换
jar
包、加?useSSL=false
,3306
加防火墙,都不能解决我的问题。最终我发现是我的LNMP
环境导致
错误提示
Response message:java.sql.SQLException: Cannot create PoolableConnectionFactory (Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
解决办法
LNMP
默认3306
端口是DROP
的,需要把这一条记录删掉
查看端口
iptables -L -n --line-numbers
显示
Chain