如何从localmachine连接CPanel MySql DB

时间:2014-04-07 10:16:37

标签: java mysql database netbeans cpanel

我正在尝试测试从NetBeans IDE8.0与新连接向导到Cpanel MySql数据库的连接。 我已经在Cpanel的Remote 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.)

1 个答案:

答案 0 :(得分:0)

如果您的服务器安装了ConfigServerFirewall,您需要在那里打开端口,尽管您在cPanel上打开了远程mysql。如果您不拥有服务器,则需要联系主机。