使用java连接到在线mysql数据库

时间:2015-08-13 11:47:17

标签: java mysql

我有一个在线mysql数据库,我想使用java应用程序连接到它,但我想知道如何获取主机表单cPanel的名称。
我使用了两个名字,但仍然无法连接到数据库:
我从这里取的第一个名字:
enter image description here

我第二次尝试从这里获取服务器的IP地址:
enter image description here

但我总是得到这个错误:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.

0 个答案:

没有答案