com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connec

连接数据库问题

问题一

: com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connection string near ‘;characterEncoding=utf-8’. at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
我遇到以上错误
原来的URL:

static final String DB_URL = "jdbc:mysql://localhost:3306/loginproject?serverTimezone=UTC&characterEncoding=utf-8";

改后的URL:

static final String DB_URL = "jdbc:mysql://localhost:3306/loginproject?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT";

本人用的 mysql-connector-java 8.0.13.jar,数据库用的MySQL 8.0的

以后还遇到数据库来接问题再更新……

com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the conneccom.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connec 浩瀚中尘埃 发布了2 篇原创文章 · 获赞 0 · 访问量 33 私信 关注
上一篇:使用jdbc对数据库进行操作时出现中文乱码的解决


下一篇:java.sql.SQLException: Unknown initial character set index '255' received from server. Ini