Try with this source code. Connection con = null; try { Class.forName("org.gjt.mm.mysql.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost/DBName?user=root");//This is for Linux for windows don't specify user=root. } catch (SQLException e) { System.out.println("error "+e); } Regds Tejesh
Stinging nettles are edible. But I really want to see you try to eat this tiny ad: