Search code examples
mysqltestingjmeterautomated-testsdatabase-testing

How to connect jmeter with database by using mysql-connector-java?


I am using phpMyAdmin version 5.7.15 and database mysql-connector-java version 5.1.40, but I am unable to connect the database with jmeter3.0. Could you please advise?


Solution

  • Add your driver in jmeter/lib folder

    Then add a JDBC Connection Configuration and fill in:

    Then add a JDBC Request under a Thread Group

    and fill in:

    • Variable Name : same value as the one in JDBC Connection Configuration

    • The other fields which depend on what you want to do

    Read this tutorial:

    If you're looking to learn jmeter correctly, this book will help you.