First, you will have to create connection to the MySql server with the right username and password. And then prepare a Sql query and execute it. Code:
Class.forName("com.mysql.cj.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/mysql?user=root&password=edureka");
Statement stmt = connection.createStatement();
String sql = "CREATE DATABASE EMPLOYEE";
stmt.executeUpdate(sql);