import java.sql.*;
import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class create_database_YTO{
public static void main(String args[]) throws IOException
{
try {
	//database mysql
	//user root
	//host : localhost (html adres)
String url="jdbc:mysql://localhost/mysql?user=root";	 
Connection conn =DriverManager.getConnection(url);
Statement stmt = null;
ResultSet rs = null;
stmt = conn.createStatement();
String s1 = "create database YTO";
if (stmt.execute(s1)) {rs = stmt.getResultSet();}
} catch (SQLException ex) {
// handle any errors
System.out.println("SQLException: " + ex.getMessage());
System.out.println("SQLState: " + ex.getSQLState());
System.out.println("VendorError: " + ex.getErrorCode());
 }
}
}