Skip navigation links

MySQL Forums :: PostgreSQL :: Create new DB automatically in Java


Advanced Search

Create new DB automatically in Java
Posted by: Richard Adler ()
Date: March 03, 2008 01:13PM

I am trying to create a new DB in MySQL using Java.
It is easy to create a new DB manually using MySQL admin tools.
However, I need to create one purely automatically.
When I try to open a Java Connection, the API call requires a DB name
as one of its parameters. Since the DB does not exist yet, I get an unknown database exception. No surprise, but I need to create a dummy
Connection that I can use to execute a Java Statement instance containing
the desired SQL Create Database command?


Is there a way to do this or is it necessary to create the database manually

Thanks

Options: ReplyQuote


Subject Views Written By Posted
Create new DB automatically in Java 7493 Richard Adler 03/03/2008 01:13PM


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.