jmeter连接数据库报错Cannot create PoolableConnectionFactory (Could not create connection to database server

报错信息如下:

Response message:java.sql.SQLException: Cannot create PoolableConnectionFactory (Could not create connection to database server.)

jmeter连接数据库报错Cannot create PoolableConnectionFactory (Could not create connection to database server_第1张图片

解决方法:

总体原因看是因为java连接数据库版本驱动过高:

1.查看自己的数据库版本:select version() from dual;

jmeter连接数据库报错Cannot create PoolableConnectionFactory (Could not create connection to database server_第2张图片

jmeter连接数据库报错Cannot create PoolableConnectionFactory (Could not create connection to database server_第3张图片

 

2.所以mysql-connect-java-5.1.38.jar 不能满足于 MySQL Version:8.0.27

所以要把mysql-connect-java-5.1.38.jar 换成更高版本的 mysql-connector-java-8.0.11.jar

下载地址:MySQL :: Begin Your Download
jmeter连接数据库报错Cannot create PoolableConnectionFactory (Could not create connection to database server_第4张图片

重新导入mysql-connector-java-8.0.11.jar包,然后修改JDBC Connection Configuration 中的"JDBC Driver class"字符串为"com.mysql.cj.jdbc.Driver"(原值为"com.mysql.jdbc.Driver")后重新运行即可

jmeter连接数据库报错Cannot create PoolableConnectionFactory (Could not create connection to database server_第5张图片

jmeter连接数据库报错Cannot create PoolableConnectionFactory (Could not create connection to database server_第6张图片 

jmeter连接数据库报错Cannot create PoolableConnectionFactory (Could not create connection to database server_第7张图片 

 

你可能感兴趣的:(jmeter,mysql,jdbc,java)