从头开始创建数据库时,可以使用:
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/?user=root&password=rootpassword"); PreparedStatement ps = connection.prepareStatement("CREATE DATAbase databasename");int result = ps.executeUpdate();这是一个相同的场景。



