The first step is to download the JDBC driver jar
The second step is to add the jar path in the test plan (if the drive jar is placed in the path. \apache-jmeter\lib directory, you can eliminate the step of adding a path)
Step three, add the JDBC Connection Configuration
Fourth step, configure the JDBC Connection configuration
Variable Name: Database connection pool name, custom, JDBC request to be consistent with it
Database url:jdbc:mysql://DB IP Address: Database port/Database name
JDBC Driver Class:com.mysql.jdbc.Driver
Username: Database user name
Password: Database Password
Fifth step, add the JDBC Request
Variable Name: Database connection pool name consistent with the Variable name Bound pool name of the JDBC Connection configuration
1) Parameter values: parameter values for parameterized queries
Parameter types: Parameter types for parameterized queries
Parametric query:
Method One, use the ${variable name in the SQL statement}, such as select Verificationcode from ' Smscode ' WHERE acount =${acount} ORDER by Createtime DESC LIMIT 1;
Method Two, use "?" in the SQL statement. "Placeholder, you need to set" Parameter values "," Parameter types ", multiple variables using", "delimited, such as:
Parameter values are variables, use the ${variable name} in the same way as:
2) Variable names: Total number of rows of data and data returned by the Save SQL statement
test_#: Total number of rows
The first row of the Test_1,test column
Referencing by using the ${test_#},${test_1} method
3) result variable name: Create an object variable that holds all returned results
For an example, see:
4) Query timeout: Query time-out
5) Handle result set: Defines how to handle the results returned by the callable statements statement
JMeter connecting MySQL