I am working to test if a mysql database is up and running. I need to do this with the help of ip , portNumber and schemaName and no username/password.
So i need to validate the connections of a database schema with the help of:
IP (hostname)
Port
DB Schema
(I will not be having username and password)
Have successfully implemented a solution for this but not able to figure out how to do the same without username/password.
Here is my current solution:
public static void checkDBstatus(){
try{
java.sql.Connection connect = DriverManager.getConnection("jdbc:mysql://10.10.200.xxx:3416/schemaName","username", "password");
System.out.println(connect.isClosed());
}catch(Exception exp){
exp.printStackTrace();
}
}