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:
- About starting the service, you always get stuck in com. Alibaba. Druid. Pool. Druiddatasource | {datasource-1} initiated
- com.alibaba.druid.sql.parser.ParserException: syntax error
- Idea error: (4, 28) Java: package com.alibaba.fastjson does not exist
- Spring cloud Alibaba 2020.0.rc1 does not integrate ribbon error reporting unknownhostexception
- com.alibaba.fastjson .JSONException: For input string: “3000-01-01” or “9999-12-31”
- [Solved] nested exception is com.alibaba.dubbo.rpc.RpcException: Failed t o invoke the method findPage
- Caused by: java.lang.ClassNotFoundException: com.alibaba.nacos.api.naming.NamingMaintainService
- java.lang.AbstractMethodError: Receiver class com.alibaba.cloud.sentinel.feign.SentinelContractHolde
- [Solved] com.alibaba.nacos.api.exception.NacosException: failed to req API
- Brief introduction of idea Lombok and solutions for reporting red and wrong
- About idea reporting error “cannot access class”
- Solution of plugins error reporting in idea maven
- NACOS error com.alibaba.nacos.api.exception.NacosException: failed to req API:/api//nacos/v1/ns/instance
- Springboot uses druid to log in MySQL. An error occurred: access denied: errorcode 1045, state 28000
- Add Druid driver to datagrip to solve Oracle garbled code
- Error reporting – the project directly introduces the error reporting and solution of. SCSS file
- Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is `com.mysql.cj.jdb
- Mysql cannot allocate memory for the buffer pool solution
- python multiprocessing.pool NameError: name is not defined
- Field userrepository in com.example.demo2.service.imp.UserServiceImp required a bean of type ‘com.ex