aspose file tools*
The moose likes JDBC and the fly likes mysql remote connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "mysql remote connection" Watch "mysql remote connection" New topic
Author

mysql remote connection

kev james
Greenhorn

Joined: Apr 06, 2004
Posts: 1
Hi, I'm having a problem using an ip address to connect to my mysql database. If i connect using localhost like below it works great, however if i use my ip address as shown below as well, it cant connect.
Thanks for the help
//conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/superconnect");
conn=DriverManager.getConnection("jdbc:mysql://10.161.43.72:3306/superconnect");
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Have you granted the remote IP permission to connect?
I'll go double check the syntax, but you have to execute the following on the database first:
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

more or less correct, except that you may require quotes around some stuff like the password, and you may also have to grant on <database> and <database>.*
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mysql remote connection