MySQL Forums
Forum List  »  Connector/JDBC and Java

DB connection url for MySQL
Posted by: david deng
Date: October 01, 2012 02:47PM

Hello,

I am new at MySQL. I downloaded a MySQL 5.5, and play with it with a sample JAVA sample program. I could connect the JAVA program to MySQL 5.5, if the JAVA program is on the same computer with MySQL 5.5.

My db connection url is as the following, and it works fine if the JAVA program and MySQL 5.5 are on same computer.

jdbc.databaseurl=jdbc:mysql://localhost:3306/test

I want to try to put the JAVA program on another computer. I changed the db connection url by using the computer (with MySQL 5.5) name like the following, but the JAVA program got the “Connection refused” exception.

jdbc.databaseurl=jdbc:mysql://mysqlpc:3306/test

Can someone please give me some direction for this?

Thank you!

Options: ReplyQuote


Subject
Written By
Posted
DB connection url for MySQL
October 01, 2012 02:47PM
October 02, 2012 11:22AM
October 03, 2012 02:16PM
October 03, 2012 02:29PM
October 04, 2012 09:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.