使用最新版mysql 8.0.11会出现的一些问题

Posted 来老铁干了这碗代码

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用最新版mysql 8.0.11会出现的一些问题相关的知识,希望对你有一定的参考价值。

最新版的mysql更新了驱动加载方式数据库的连接方式

如果仍然使用旧版的Mysql的连接方式,就会出现许多错误。

更改前:mysql的连接指令

String driver = "com.mysql.cj.jdbc.Driver";
String URL = "jdbc:mysql://localhost:3306/student
String username = "root"
String password = "root"

更改后:mysql的连接指令

其中driver中需要添加.cj

url中需添加时区标记serverTimezone=UTC

String driver="com.mysql.cj.jdbc.Driver"
String URL="jdbc:mysql://127.0.0.1:3306/kill?serverTimezone=UTC"
String username ="root"
String password="root"

以上是关于使用最新版mysql 8.0.11会出现的一些问题的主要内容,如果未能解决你的问题,请参考以下文章

mysql 8.0.11 中使用 grant ... identified by 时 error 1064 near 'identified by '密码'' at l

Navicat 连接MySQL 8.0.11 出现2059错误

Navicat 连接MySQL 8.0.11 出现2059错误

MySQL Community Server 8.0.11下载与安装配置

Navicat 连接MySQL 8.0.11 出现2059错误

Navicat 连接MySQL 8.0.11 出现2059错误