我最近将我的 MySQL 实例从 5.7 升级到了 8.0。我使用 JDBC 和一个如下所示的连接字符串连接到我的旧实例:
jdbc:mysql://[host:port]/[database]/?sessionVariables=sql_mode=''
升级到 8.0 后导致此错误
com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connection string near '='')'.
如何在 MySQL 8 的 JDBC 连接字符串中设置 SQL 模式?