0
votes

I am unable to connect http://localhost/phpmyadmin by using jmeter... i have placed mysql-connector-java-5.1.44-bin in lib folder of jmeter directory...

I am using WAMP Server

Error: Cannot create PoolableConnectionFactory (Unknown database 'phpmyadmin/')

Connection settings are as follows:

  • DB URL: jdbc:mysql://localhost/phpmyadmin/
  • JDBC Driver class: com.mysql.jdbc.Driver
  • Username:root
  • password:
2

2 Answers

2
votes

It's not clear what you are trying to achieve, but you are surely confusing 2 things:

  • phpmyadmin is a web application. If your goal is to test that web application, you should be using HTTP Sampler. You cannot test web application using JDBC sampler.

  • If you want to test a database on your My SQL instance using JDBC sampler, you have to provide a name of valid database just as an error says. Typically instance of MySQL comes with a bunch of system databases, so you can use one of them, for example:

    DB URL: jdbc:mysql://localhost/test
    

    should work, since MySQL typically comes with test database pre-installed. Or you can create your own database and provide its name there.

0
votes
  • If you want to load test phpMyAdmin web interface - remove JDBC Request sampler and switch to HTTP Request Sampler. Most probably you will also need to add a HTTP Authorization Manager configured to send the relevant credentials (default username is root with blank password, if it doesn't fit you can reset the password). See How to Use HTTP Basic Authentication in JMeter article for example Test Plan for logging into phpMyAdmin web interface
  • If you would like to continue playing with the JDBC Request sampler, the error you are getting states that phpmyadmin database is missing, you will need to create this database prior to attempting connecting to it using JMeter