title: Create MySQL database from Java
body: <p>Is it possible to create a MySQL database from Java?</p>
  
  <p>I have only seen connection URLs examples like this where the database name is specified in the URL: </p>
  
  <pre><code>String url="jdbc:mysql://localhost:3306/test";
  
  Connection con = DriverManager.getConnection( url, "cb0", "xxx" );
  </code></pre>
  
  <p>How can I create a MySQL database when I only have a login name and password?</p>