三、用户名和密码 可以调用 DriverManager 类的 getConnection() 方法建立到数据库的连接,此方法需要传递三个参数: url:jdbc:mysql://localhost:3306/ydlclass?useUnicode=true&characterEncoding=utf8&&useSSL=false&serverTimezone=GMT%2B8 username:root (mysql数据库的用户名) password:root (mysql数据库的密码)