我的电脑的xampp不工作,我有一个网络服务器。我无法使用以下代码连接到MySql数据库
Class.forName("com.mysql.jdbc.Driver");
connection=DriverManager.getConnection("jdbc:mysql://server188.web-hosting.com:2083/databaseName","user","password");
System.out.println(connection);
System.out.println("Connected!");
它出现以下错误:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 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
这不是关于连接localhost。这是一个WebHosting。请帮我。找不到我的错误。