import java.sql.*; class jdbc1 { public static void main(String args[])throws Exception { try { Class.forName("com.Mysql.jdbc.Driver").newInstance(); System.out.println("Connecting to database..."); Connection con = null; con = DriverManager.getConnection("jdbc:mysql://localhost:3306/db","root",""); System.out.println("connection established..................."); } catch(Exception e) { System.out.print("\n "+e.getMessage()); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)