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这一配置过程,基于不同的加密方式,如果选择第一种强加密,就会出现我之前描述的现象;应该选第二种验证方式,即保留旧有的加密方式。

所以解决办法有3种:

1.重新装mysql8,注意选择第二种,保留旧的加密方式。

2.MySQL Installer可以直接修改Authentication Method配置

3.直接执行语句修改

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';Query OK, 0 rows affected (0.11 sec)mysql> FLUSH PRIVILEGES;Query OK, 0 rows affected (0.01 sec)

总结

更多相关文章

  1. 'xlargeScreens' in package 'android'
  2. Android(安卓)版本兼容 — Android(安卓)6.0 和 7.0后获取Mac地
  3. android“设置”里的版本号
  4. Android(安卓)version and Linux Kernel version
  5. opengrok setup on ubuntu for android source code browser
  6. Android——开发环境
  7. android通过ksoap2对webservice的解析
  8. Android如何获得系统版本
  9. Android,一个思路实现APP版本更新

随机推荐

  1. 让star也具有CheckBox 功能
  2. android程序在Layout中设置控件水平或垂
  3. Android TextView 文字居中
  4. android 布局文件详解
  5. linux ubuntu android SDK安装
  6. Android系统自带样式(@android:style/)
  7. android layout 属性大全
  8. Android修改默认控件焦点不highlight
  9. Android EditText inputType同时设置text
  10. 安装Android Studio——Installing Andro