Jmeter 连接Mysql数据库方法及遇到问题的解决方法

报错

Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc:mysql-xxxxxxxx.rds.jdcloud.com:8888/getam_test'

驱动下载带bin的地址  解压后重启Jmeter

链接:https://pan.baidu.com/s/1QW30DDqyMZpF7PHK1qz_YA

提取码:fbzv

官网下载地址:https://dev.mysql.com/downloads/connector/j/


1.改变驱动的存放路径  lib   改为 lib下的ext


2.测试计划导入驱动包


3.有些可能是URL写错

错误例子:jdbc.mysql://mysql-internet-cn-north-1-4621f8723efb43e8.rds.jdcloud.com:5888/getam_test

正确例子:jdbc:mysql://mysql-internet-cn-north-1-4621f8723efb43e8.rds.jdcloud.com:5888/getam_test

jdbc 将冒号“:”写为了点 “.”

常用格式:jdbc:mysql://{ip}:{port}/{dbname}?useUnicode=true&characterEncoding=utf8,加入后缀防止乱码

jdbc:mysql://mysql-internet-cn-north-1-4621f8723efb43e8.rds.jdcloud.com:5888/getam_manage?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=UTC

你可能感兴趣的:(Jmeter 连接Mysql数据库方法及遇到问题的解决方法)