1.jar包版本不对
教学大多用的是 mysql-connector-java-5.0.X.jar
而自己的数据库大多用的是 mysql-connector-java-8.0.X.jar,此类问题下载并导入新的jar包即可
报错如下:
###Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client
###The error may exist in dao/IUserDao.xml
###The error may involve dao.IUserDao.findAll
###The error occurred while executing a query
###Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client
问题:
2.数据库连接的时区问题
报错如下