我在一台机器上设置了一个远程 mysql 数据库服务器myuniversity.edu
,服务器名为“ localhost
”。在它上面我有一个名为' MyDatabase
'的数据库。
I want to connect it through Java.
The connection urls that I have tried are:
jdbc:mysql://myuniversity.edu/localhost
jdbc:mysql://myuniversity.edu/localhost/MyDatabase
jdbc:mysql://myuniversity.edu:3306/MyDatabase
but I get the `Connection refused: connect` exception.
有人可以告诉在这种情况下连接网址应该是什么吗?