在eclipse出现下面问题

com.mysql.cj.core.exceptions.WrongArgumentException: Connector/J cannot handle a database URL of type 'jdbc
public static Connection getConn() {
Connection conn = null;
try {
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
conn = DriverManager.getConnection("jdbc.mysql://localhost/bbs?serverTimezone=UTC&user=root&password=tiger");
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
return conn;
}

用冒号,不是点号

 jdbc:mysql://localhost:3306/sakila?profileSQL=true

localhost后面需要跟上mysql的端口号,一般默认3306

jdbc:mysql://localhost:3306/cac_statistics?useUnicode=true&characterEncoding=utf-8