Jmeter中,使用JDBC请求失败报错:
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.)
原因排查:
- JDBC连接配置中,数据库连接名错误。尤其数据库连接名很长的,仔细检查是否复制的字符串缺少。
- Database URL拼写格式错误。以mysql为例,正确格式为:jdbc:mysql://主机名或ip地址:端口号/数据库名。
- 用户名、密码错误。
- mysql-connector jar包版本过低。下载更换新版本:mysql.com/downloads/
来源地址:https://blog.csdn.net/Albert_6/article/details/129383986