JMeter connects to Mysql

1. Put mysql-connector-java-5.1.7-bin.jar into the lib folder of the Jmeter installation directory

 

2. Load the driver in the top-level directory <test plan>


 

3.添加JDBC Connection Configuration


 

4. Configure database information

1) Variable Name cannot be empty

2) The DataBase URL format is: jdbc:mysql://server ip:port number/database

    Add the parameter ?allowMultiQueries=true after the database to execute multiple mysql statements at the same time; otherwise, an error will be reported

3)JDBC Driver Class:com.mysql.jdbc.Driver

4) Enter the username and password for the database


 

5. Add JDBC Request



6. Add variables and query statements

    The variable name must be consistent with the variable name in the JDBC Connection Configuration


 

7. Execute the query statement


 

Article source: http://www.cnblogs.com/jessicaxu/p/7507946.html

Guess you like

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