Validate and test MySQL Java Database Connectivity connections for Cloud Data Protection

book

Article ID: 168978

calendar_today

Updated On:

Products

CDP for ServiceNow CDP for Salesforce CDP Communication Server CDP for Oracle Sales Cloud CDP for Oracle CRM On Demand

Issue/Introduction

The following procedure shows how to test MySQL database connectivity using MySQL Java Database Connectivity (JDBC) jar.

Using the JDBC to connect to the MySQL Database allows for more accurate results as opposed to testing via telnet or ping since it allows for full connectivity.

Resolution

Steps:

  1. Download MySQL_JDBC_TestTool.zip found on this article
  2. Transfer MySQL_JDBC_TestTool.zip to CDP Server
  3. Unzip MySQL_JDBC_TestTool.zip
  4. cd to MySQL_JDBC_TestTool
  5. Run command (see examples below)


Syntax:
java -cp .:./sqljdbc4.jar TestDBMySQL jdbc:mysql://<ip_address>:<port>/<username> <password>

Example:
java -cp .:./mysql.jar TestDBMySQL jdbc:mysql://127.0.0.1:3306/psys_cluster cdpadmin root1pass

Results:
Successful connections should provide a listing of tables in the database being connected to.