jmeter连接数据库The driver has not received any packets from the server

在这里插入图片描述
在用jemter连接数据库时报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.)。翻阅各种资料,终于解决了。

解决办法:将图中数据库URL改为jdbc:mysql://127.0.0.1(或者localhost):3306/test即可
因为root权限的数据库只能通过localhost访问,当然你也可以在虚拟机中用docker启动mysql,这样就可以用ip地址去访问啦,注意要把JDBC的jar包放到jmeter目录下的lib/ext里面。

在这里插入图片描述

这样就完美解决啦
在这里插入图片描述

萌新第一次发博客,希望能帮助到大家,一起学习成长!!!

猜你喜欢

转载自blog.csdn.net/hyk1499449886/article/details/108588635
今日推荐