permaculture playing cards
The moose likes JDBC and Relational Databases 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
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "connect to remote mysql db using jdbc" Watch "connect to remote mysql db using jdbc" New topic

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

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.

Jan Cumps

Joined: Dec 20, 2006
Posts: 2565

Does your provider (let's keep naming him 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
I agree. Here's the link:
subject: connect to remote mysql db using jdbc
It's not a secret anymore!