开发者

what would be the database URL of the mysql database that we access through phpMyAdmin?

I am writing a code that access a MySql database. The database is on a server that we access through our web-browser

Let's say,

URL: http://cbm.goo.com/phpMyAdmin

Username: username

Password: password

The above username and password are used to access the MySql database through a web-browser.

Q1. What would be database url of the database to be used in JDBC programming?

I tried the follow开发者_StackOverflow中文版ing url but it didn't work

jdbc:mysql://cbm.goo.com:3306/scores?user=username&password=password

========================== Edited ===================================

I am getting the following error:

Communications link failure

The last packet successfully received from the server was 1,267,163,244,109 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.


Check that your internet connection is not going through some sort of firewall that is blocking access to port 3306.

Some companies have restricitions set on which ports can be used. Web servers use port 80 which is usually opened up to allow web browsing. Your MySQL server is using port 3306.


Using JDBC with MySQL quick start guide

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜