File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connect to remote mysql db using jdbc

 
kwame Iwegbue
Ranch Hand
Posts: 197
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Medha Jhunjhunwala
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2576
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic