1.按照网上查的方法,将mysql-connector-java-5.1.42-bin.jar包copy在apache-jmeter-2.12\lib\ext下,执行测试计划,查看结果树,报No suitable driver found for jdbc:mysql
2.检查发现很久之前装的jdk,并没有在环境变量中进行配置,重新配置环境变量
3.之后重新参考网上查的方法,在以下目录下面,copy进mysql-connector-java-5.1.42-bin.jar包
http://www.jmeter-/java-sql-SQLException-No-suitable-driver-found-for-jdbc-mysql-td4553152.html
1)apache-jmeter-2.12\lib
2)C:\Program Files\Java\jdk1.7.0_79\jre\lib
3)C:\Program Files\Java\jdk1.7.0_79\jre\lib\ext
4.将以下路径添加到环境变量CLASSPATH
1)D:\software\apache-jmeter-2.12\lib\mysql-connector-java-5.1.42-bin.jar;
2)C:\Program Files\Java\jdk1.7.0_79\jre\lib\mysql-connector-java-5.1.42-bin.jar
5.重新执行测试计划,又报错No suitable driver found for jdbc:mysql
6.最后一步,在测试计划下面。将该jar包重新添加一遍
7.重新运行测试计划,这次没有再报No suitable driver found for jdbc:mysql