3. Advanced Connection Management - Kev575/KevSQL GitHub Wiki

Set the connection destination

SQLConnection yourConnection = KevSQL.createConnection("testCon");
SQLURI uri = new SQLURI(SQLDriverType.JDBC_MYSQL, "hostname_or_ip.com");
// You can set the port of the SQLURI if you add an argument to the constructor (int)
uri.setDatabase("kevdatabase"); // optional
yourConnection.setURI(uri);

Connect to the destination

// with password
yourConnection.connect("your_username", "your_password");
// without password
yourConnection.connect();

Disconnect

yourConnection.disconnect();

Terminate the connection

Only use if you're sure what this does.

yourConnection.terminate();