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:

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 MySQL JDBC Driver from MySQL site:
http://dev.mysql.com/downloads/connector/j/5.1.html

b. Rename mysql-connector-java-5.1.10-bin.jar to mysql.jar for your convenience to use the driver name

c. Copy mysql.jar to \probe\database\jdbc_response\jar\

d. Change runprobe.bat:
set CLASSPATH should look like this:
set CLASSPATH=jar\jdbc_response.jar;jar\nimsoft.jar;jar\TwoFish.jar;jar\oracle.jar;jar\sql_drv.jar;jar\mysql.jar

Note jar\mysql.jar

e. In jdbc_response probe connection properties:

Database URL: jdbc:mysql://##.##.##.##:3306/test
Driver Name: com.mysql.jdbc.Driver
Driver Path: /Program Files/Nimsoft/probes/database/jdbc_response/jar/mysql.jar
User ID: MySQL user set with right permissions/access
Password: MySQL user password

You should now be able to connect the MySQL Server database using the jdbc_reponse 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