mysql数据库版本从5.6.28升到8.0.11,部署项目遇到的问题。
首先这个项目用到了hibernate4.2.0,链接mysql5.6.28没问题,换到8.0.11,启动报错
1.Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set
报错就配置吧
启动项目不报错了,但是访问项目报错了
2.访问报错com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client
原因是:安装mysql8过程中的Authentication Method这一配置过程,基于不同的加密方式,如果选择第一种强加密,就会出现我之前描述的现象;