JMETER database MYSQL--Introduction

1. Download the jar package

Address: http://mvnrepository.com/artifact/mysql/mysql-connector-java

According to the mysql version, select the appropriate jar package

image

2. TEST (example MYSQL)

1. Thread group - right click to add - configuration element - JDBC Connection Configuration

Configure connection pool

Variable Name: (custom, needs to be consistent with the Variable Name in the JDBC Request)

Database URL:jdbc:mysql://localhost:3306/world

JDBC Driver class:com.mysql.jdbc.Driver(固定)

Username: root (username)

Password: ********* (password)

image

2. Thread group-right-click to add-Sampler-JDBC Request

Configure JDBC requests

Variable Name: (custom, needs to be consistent with the Variable Name in JDBC Connection Configuration)

SQL Query Type: Set as needed, add, delete, modify and query (with parameters Prepared without parameters)

image

3. View the result tree

image

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325290332&siteId=291194637