I am using jdbc to connect database in an applet(on the same machine, ip is 202.96.193.122): method1 works: sqlConn=java.sql.DriverManager.getConnection ("jdbc:mysql://localhost:3306/resource?user=caven;password='winner'"); method2 goes wrong: sqlConn=java.sql.DriverManager.getConnection ("jdbc:mysql://202.96.193.122:3306//resource?user=caven&password='winner'");