Here's what I have used. In Matlab this works.
import java.sql.*;
ConnD = DriverManager.getConnection(...
'jdbc:mysql://localhost/?user=urname&password=urpassword');
sD=ConnD.createStatement();
Result=sD.executeUpdate('CREATE DATABASE urdatabasename');
sD.close();
ConnD.close();
Mind you, this doesn't include error handling and checks. Make sure you handle your data carefully.