Esempio n. 1
0
 void run() throws Exception {
   MySQL db = new MySQL();
   db.setName("MySQL-Test");
   db.setHost("localhost");
   db.setDatabaseName("designstate");
   db.setUsername("DesignState");
   db.setPassword("zero0");
   Connection con1 = db.connect();
   Connection con2 = db.connect();
   db.release(con1);
   db.release(con2);
   Thread.sleep(2000);
   con1 = db.connect();
   PreparedStatement s = con1.prepareStatement("show variables like 'wait_timeout'");
   ResultSet r = s.executeQuery();
   r.next();
   long wait = r.getInt("Value");
   {
   } // System.out.println(wait);
 }
Esempio n. 2
0
 public static void main(String[] args) {
   MySQL sql = new MySQL("jdbc:mysql://www.textbookchecker.com/games", true);
   sql.query("SELECT * FROM `karthas`");
   sql.close();
 }