create new MySQL Database with SQL

I have a simple question, :-)how can I create a new MySQL Database with SQL - (JDBC)can you show me a code example?tank you ...
[155 byte] By [Don-Lna] at [2007-10-2 10:58:39]
# 1
CREATE DATABASE nameofyourdatabaseOf course you need appropriate MySQL permissions to do this...
Don-Lna at 2007-7-13 3:26:27 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2

okay ... but how do I use the URL ? that's the problem

I tried this:

Connection con= null;

Vector vct= new Vector();

try{

String drv = "org.gjt.mm.mysql.Driver";

String url = "jdbc:mysql://111.222.333.444:3306";

String name = "myname";

String pass = "mypass";

Class.forName(drv);

con = DriverManager.getConnection(url,name,pass);

String statement = "CREATE DATABASE TestDB_Don1";

Statement stm = con.createStatement();

stm.execute(statement);

stm.close();

con.close();

}

catch(Exception e){ e.printStackTrace(); }

but it doesen't work ............. what is wrong ?

Don-Lna at 2007-7-13 3:26:27 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
okay, I found my mistake ... I forgot a slashrg: "jdbc:mysql://111.222.333.444:3306";wr: "jdbc:mysql://111.222.333.444:3306/";thx anyway :-)
Don-Lna at 2007-7-13 3:26:27 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...