我正在尝试使用新建连接向导测试从NetBeans IDE8.0到Cpanel MySql数据库的连接。我已经在Cpanel的远程MySql选项中添加了我的机器IP地址,但仍然无法连接数据库。我收到以下错误消息
Cannot establish a connection to jdbc:mysql:// someIP:3306/hariom?zeroDateTimeBehavior=convertToNull using com.mysql.jdbc.Driver (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.)
如果您的服务器安装了ConfigServerFirewall,尽管您在cPanel上打开了远程mysql,但您还需要打开那里的端口。如果您不拥有服务器,则需要为此与主机联系。