CREATE DATABASE
Posted by: y0015559
Date: June 28, 2006 12:10PM

Hi all!
Can anybody tell me, how can I create a database using JDBC?
Main problem, I don't know how I can create a connection if a database don’t exist.

For example
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql:///test",
"root", "secret");

How can I create a connection, if the database "test" don’t yet exist and I want create it?

Many Thanks



Edited 3 time(s). Last edit at 06/28/2006 05:02PM by y0015559.

Options: ReplyQuote


Subject
Written By
Posted
CREATE DATABASE
June 28, 2006 12:10PM
July 06, 2006 12:16AM
July 12, 2006 02:14PM


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.