Preface: The previous article said JMeter environment variables, use and parameterization settings, this article mainly talk about JMeter connection MySQL database, if you do not know how to use JMeter, please see article: JMeter environment Configuration, use and parameterization of the CSV Data set Config
This article takes the MySQL database as an example.
1, download Mysql-connector-java-5.1.38-bin.jar package,: http://download.csdn.net/download/u013786092/9357533
2, after download is placed in the JMeter path of the Lib directory
3. Add JDBC Connection Configuration
4. Open the JMeter and add the JDBC Connection configuration element, configured as follows:
1) Varible Name: This is the name of the variable and the variable cannot be duplicated2) JDBC Url:jdbc:mysql://10.30.0.42:3306/cifwhere 10.30.0.42:3306, the address and port number of this database;CIF This is the database name of the test. 3) Driver Class :org.gjt.mm.mysql.Driver or com.mysql.jdbc.Driver
4) Username: Login name for this database 5) Password: This is the login password for the database
5. Create a JDBC Request
6. Fill in variable name in the 4th step variable name is the same. Write the SQL statement.
7, completed, can execute the view SQL statement execution results
8. The database is connected successfully.
JMeter connecting MySQL Database