jmeter使用jdbc连接mysql数据库遇到的问题

问题一、已将myql的jar包放在jmeter5.1的lib目录下并重启过jmeter,连接数据库提示

Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc.mysql://localhost:3306/database'

 原因:

URL填写有误,将冒号“:”写为了点 “.”

应为:jdbc:mysql://localhost:3306/database

 问题二、

Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)

 原因:

mysql-connector-java的jar包版本太低,更换高版本后问题解决。

猜你喜欢

转载自www.cnblogs.com/Noul/p/11905362.html