jdbc_response - creating a connection to a MySQL Database
search cancel

jdbc_response - creating a connection to a MySQL Database

book

Article ID: 34390

calendar_today

Updated On: 06-23-2025

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

This article provides instructions on how to create a connection to a MySQL database using the jdbc_response probe.
 
Depending on OS(Windows/Linux) configuration may vary (please refer to your platform's MySQL documentation).

 

Environment

Release: DX UIM 20.4.x / 23.4.X
Component: jdbc_probe 

Resolution

Part-I - On MySQL Server:

1- Enable Remote access for MySQL:

a. In my.cnf, make MySQL Listen on ethernet IP address:
Under [mysqld] section:
bind-address=YOUR-SERVER-IP
and comment out the following (if exists)
# skip-networking

b. Save/exit the file and restart MySQL
# /etc/init.d/mysql restart


2- Allow remote access to the MySQL monitoring user:

a. Login to MySQL using 'mysql' command:
#mysql -u root –p password
Change with your 'root' password

b. Create MySQL monitoring user:
mysql>create user 'dbuser' identified by 'password';


c. Grant new user access to monitored databse: 
mysql>grant all on test.* to dbuser@'jdbc_reposne Robot IP Address;

Change the GRANT statement to allow only required permissions per probe help document.

Part-II - On 'jdbc_response' probe Robot:

a. Download an appropriate MySQL JDBC Driver from the MySQL site for the version you are using.

example:
http://dev.mysql.com/downloads/connector/j/5.1.html

(A driver for MySQL 8.x is attached to this KB as well.)

Since this is a .jar file there is no difference between the driver for Windows or for Linux, the same file works on both.

b. Rename the file (e.g. mysql-connector-java-5.1.10-bin.jar) to mysql.jar for your convenience.


c.
Windows:
Copy mysql.jar to (UIM_HOME)\Nimsoft\probes\database\jdbc_response\jar\
Linux:
Copy mysql.jar to (UIM_HOME)/nimsoft/probes/jdbc_response/lib/



d. (Windows Only)
In the folder /probes/database/jdbc_response, locate and edit the file called runprobe.bat:
edit the line starting with "set CLASSPATH" as follows:


set CLASSPATH=jar\jdbc_response.jar;jar\nimsoft.jar;jar\TwoFish.jar;jar\oracle.jar;jar\sql_drv.jar;jar\mysql.jar

(You need to add the jar\mysql.jar to the end of the existing entry)

This step is not necessary on Linux.

e. In jdbc_response probe connection properties, set the URL and driver information as follows:

Database URL: jdbc:mysql://##.##.##.##:3306/test
Driver Name: com.mysql.jdbc.Driver
Driver Path: (path to driver from above)
User ID: MySQL user set with right permissions/access
Password: MySQL user password

Windows example driver path:  C:\Program Files (x86)\Nimsoft\probes\database\jdbc_response\jar\mysql.jar
Linux example driver path:  /opt/nimsoft/probes/database/jdbc_response/lib/mysql.jar



You should now be able to connect the MySQL Server database using the jdbc_response probe.

 

Additional Information

1- Make sure you have JRE installed on the jdbc_response probe robot. 
2- On the MySQL server, modify firewall rules to allow connection to MySQL port (default is 3306/tcp).

Attachments

MySqlJdbcDriver.zip get_app