Can we create a new MySQL database( not a table, I want a new database) from java code ? I have searched the internet and I get code only for connecting with existing mysql databases. Can i create a new database at run time using java code.
please help
In your connection string omit a database name and then execute Create database command.
Connection String:
jdbc:mysql://localhostCreate Database Syntax :
stm.executeUpdate("CREATE DATABASE dbname")