aspose file tools*
The moose likes JDBC and the fly likes connect to remote mysql db using jdbc 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 "connect to remote mysql db using jdbc" Watch "connect to remote mysql db using jdbc" New topic
Author

connect to remote mysql db using jdbc

kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
I have a new remote mysql database, and I would like to run an Ant target from my local machine to build a hibernate database schema on the remote site.
my jdbc settings are something like:



but I keep getting this error:

[hibernatetool] Error #1: java.sql.SQLException: Connections could not be acquired from the underlying database!

I know the database exists, and that I have the right un and pw. this tools works fine when building the schema on localhost on my machine.
any ideas please?


Who dares, wins! (SAS motto)
Medha Jhunjhunwala
Greenhorn

Joined: Sep 06, 2007
Posts: 9
Did you try connecting to the same URL using some other client like jdbc or mysqlcc? Does the url work there? Maybe you are missing port number or something there. Please tell us how you made it work.

-Medha
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

Does your provider (let's keep naming him www.domain.com) allow you to connect to your database via the internet?

Most providers that give you a mySQL database service, only allow you to access the database from the server itself (where your deployed web application runs), and allow you to do the db administration via mySqlAdmin.

They do not allow you to access the database from your home computer via the internet.

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connect to remote mysql db using jdbc