[error handling] idea error reporting com.alibaba.druid . pool.DruidDataSource error

Screenshot of error reporting part:

version at the time of error reporting:

jdk1.8   
mysql 8.0.17  
idea2018.3.6 
mysql-connector-java-5.1.37-bin.jar
1.0.9Druid

Error reason:
when an error is reported, the MySQL driver is 5, but the MySQL version is 8, which does not match

Solution:
after changing the MySQL driver to 8.0.16,
then com.mysql.jdbc . driver to com.mysql.cj . jdbc.Driver ,
add after Druid configuration

filters=stat
timeBetweenEvictionRunsMillis=60000
minEvictableIdleTimeMillis=300000
validationQuery=SELECT 1
testWhileIdle=true
testOnBorrow=false
testOnReturn=false
poolPreparedStatements=false
maxPoolPreparedStatementPerConnectionSize=200

Problem solving.

PS: if you have a similar problem, you can communicate with qq2287015934.

Read More: