1
2
3
4
5
6
7
8
9
10
|
try{
Class.forName(com.mysql.jdbc.Driver);
System.out.println(Success loading Mysql Driver!);
String url ="jdbc:mysql://localhost/dbName?user=soft&password=soft1234&useUnicode=true&characterEncoding=8859_1"
Connection conn= DriverManager.getConnection(url);
}catch(Exception e)
{
System.out.println(Error jdbc to mysql!);
e.printStackTrace();
}
|