1. Download the jar package
Address: http://mvnrepository.com/artifact/mysql/mysql-connector-java
According to the mysql version, select the appropriate jar package
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)
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)
3. View the result tree