Search code examples
mysqljdbcjmeterperformance-testing

JDBC Connection Configuration for MYSQL not working in Jmeter


As per the instructions given in link:

http://www.testingdiaries.com/jmeter-mysql-load-testing/

I downloaded the JAR for MySQL and placed it in the lib directory of JMeter Home folder. I also added the jar to the classpath in the JMeter GUI as well. However, I dont get the 'JDBC Connection Configuration' option under Add->Config Element sub menu. Should I do something else to get it?

Edit: I have attached the screenshot for the same below: No JDBC Option available


Solution

  • What OS you're running and how did you install JMeter?

    Sometimes packaging sucks, for instance crazy Ubuntu maintainers think that default JMeter should be shipped only with HTTP protocol support and if you need Mail, LDAP, etc. you need to install the relevant packages separately.

    I would recommend the following:

    1. Download and install latest version of Oracle JRE (or even better JDK) and modify your JAVA_HOME and PATH variables to include /bin folder of the JRE/JDK
    2. Download latest JMeter from Apache website and unpack it
    3. Download JDBC MySQL driver, unpack it and drop mysql-connector-java-x.x.xx-bin.jar to /lib folder of your JMeter installation.
    4. Don't install any plugins or any other stuff unless you really need it. JMeter plugins maintainers have alternative vision of packaging as well (for instance Selenium libraries clash with JMeter ones and who knows what else)
    5. Follow steps from The Real Secret to Building a Database Test Plan With JMeter guide to set up database URL, JDBC driver class, credentials, etc.

    If anything goes wrong update your question with at least jmeter.log file and leave a corresponding comment so we could take a look.