一,安装的时遇到的坑

我下的是Mysql 8.0.13
下的是解压版(个人能不用安装就不想用安装版的强迫症(/▽\))
然后问题就来了:
解压后还要初始化,命令是:
mysqld --initialize --user=mysql --console
然后我就一直会有错误,导致初始化出问题。
配置好环境变量,然后用cmd管理员权限才成功(没成功的话可能就是没用管理员权限)
初始化出来的临时密码要记起来,最好就安装完及改掉,要不然就麻烦。

二,eclipse中启动项目时出错

①第一个Error:MySQLNonTransientConnectionException

MySQLNonTransientConnectionException:
Client does not support authentication protocol requested by server; consider upgrading MySQL client

错误原因:MySQL的驱动不支持了

解决:下载最新的适合的驱动;

下载链接:https://dev.mysql.com/downloads/connector/j/

选择平台独立,然后下载。

②第二个Error:Loading class…

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'.
The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

错误原因:原来的驱动‘com.mysql.jdbc.Driver’已被弃用需使用新的驱动’com.mysql.cj.jdbc.Driver’。

解决:将驱动的代码改为新的,我做的一个是SSH的 ,将jdbc.properties中的

jdbc.driver = com.mysql.jdbc.Driver
改为==>
jdbc.driver = com.mysql.cj.jdbc.Driver

③第三个Error:The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized

The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

错误原因:它说时区不能识别,需要指定时区

解决:在uri链接上加上时区的参数指定时区。

jdbc.url = jdbc:mysql:///artexam?serverTimezone=UTC

④第四个Error:Public Key Retrieval is not allowed

当我重启数据库的时候,再次启动项目就报了这个错:

Public Key Retrieval is not allowed

解决:在参数上给它带上允许

jdbc.url = jdbc:mysql:///manxc?serverTimezone=UTC&allowPublicKeyRetrieval=true

最新文章

  1. JDBC 练习
  2. 用js把数据从一个页面传到另一个页面
  3. 高级搜索插件solis search在umbraco中的使用
  4. Apache多站点实现原理和配置
  5. 再谈 X-UA-Compatible 兼容模式
  6. Ajax调用WebService
  7. ruby on rails揭开route路由的真面目
  8. cisco telnet会话SESSION管理及相关Dynagen配置文件
  9. 零基础学python-2.8 字典
  10. Linux 环境下程序不间断运行
  11. Java的字符串分割的不同实现
  12. CentOS 6.X启动流程
  13. C Primer Plus 第10章 数组和指针 编程练习
  14. eclipse 开发web 项目,使用gradle 需要安装的插件
  15. Android应用系列:值得收藏的ViewHolder工具类实现
  16. YGC和FGC发生时间
  17. C#-----------------------------回收机制中Destroy与null的作用
  18. vs2013 update 2 cordova(phonegap) 环境
  19. 简单的redis工具类
  20. (转)《SSO CAS单点系列》之 实现一个SSO认证服务器是这样的!

热门文章

  1. c# 第六节 c#的程序结构,以及vs的文件结构
  2. eth0: ERROR while getting interface flags: No such device的解决方法、Linux怎么修改IP以及ping不通的处理方法
  3. RST复位报文
  4. spark 配置
  5. LeetCode 1257. Smallest Common Region
  6. 2016年蓝桥别A组模拟训练
  7. [LeetCode] 746. Min Cost Climbing Stairs 爬楼梯的最小损失
  8. [LeetCode] 694. Number of Distinct Islands 不同岛屿的个数
  9. Spring Cloud Gateway 之 AddRequestHeader GatewayFilter Factory
  10. Idea用maven给springboot打jar包