Mysql远程连接地址

时间:2013-11-25 20:23:16

标签: java mysql

我正在连接到mysql远程地址。虽然我得到一个错误,必须指定端口,但我已经在这里了?

 Connection con = (Connection)DriverManager.getConnection("jdbc:mysql://http://185.27.134.10:3306","username","password");

1 个答案:

答案 0 :(得分:3)

删除'http://'架构。

 Connection con = (Connection)DriverManager.getConnection("jdbc:mysql://185.27.134.10:3306","username","password");

The docs