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.
Steps:
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.