JDBC第一学のデータベース接続時にThe server time zoneが現れる.....解決策

461 ワード

JDBCによるデータベース接続の学習では、DriverManagerを使用する場合、さまざまな問題が発生します.getConnection(url, username, password);//データベース接続の取得中にThe server time zone...問題が発生した場合、urlを**として入力します.jdbc:mysql://localhost:3306/jdbc?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true”;** 例えば:String url="jdbc:mysql://localhost:3306/jdbc?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true";//