public static Tuple<bool, string> testConnection( string host, string username, string password, string database, int port ) { MySQL mySqlTestInstance = new MySQL( host, username, password, database, port ); try { mySqlTestInstance.connect(); mySqlTestInstance.close(); return Tuple.Create(true, ""); } catch (Exception e) { return Tuple.Create(false, e.Message); } }