0
votes

i have tried to connect from Jmeter to external mysql server using JDBC sampler. But I am getting erros. its possible to connect to the local mysql server.I am confused how to connect jmeter from my local machine to server database in other machine using JDBC CONNECTION

2
Show logs or anything you've triedJosé Ricardo Pla

2 Answers

0
votes
  1. Make sure you remote MySQL server is accepting remote connections. Locate bind-address line in my.cnf file and set it to listen on all interfaces:

    bind-address    = 0.0.0.0
    

    See Troubleshooting Problems Connecting to MySQL for more details. You will need restart MySQL server in order to pick up any changes made in my.cnf file

  2. Make sure your operating system firewall on MySQL server side allows incoming connections to MySQL server TCP port (default is 3306).
  3. Verify that you able to hit port 3306 with a telnet client or equivalent

If you will be still experiencing problems - update your question with JDBC Request sampler output and jmeter.log file contents. I would also recommend checking out The Real Secret to Building a Database Test Plan With JMeter to learn more about the concept of databases load testing using JMeter

0
votes

If you are able to connect to that server using MySQL Workbench or another tool just use the below config for JMeter.

Just remember that you need to have mysql-connector-java-5.1.40-bin.jar (or another version of it) under apache-jmeter-3.0\lib\ folder.

enter image description here

enter image description here

Hope this helps!