import java.sql.*;
public class Swing02
{
public static void main(String [] args)
{
try
{
Class. forName("com.mysql.jdbc.Driver"); // jdbc 드라이버 로드
Connection conn = DriverManager.getConnection( "jdbc:mysql://localhost:3306", "root", "1234" ); // 연결
System. out.println("JDBC Connection Complete!");
}
catch(Exception e )
{
System. out.println(e .getStackTrace ());
}
}
}
'2014학년도 겨울 심화학기 > JAVA' 카테고리의 다른 글
7일차 Swing02 클래스 (SQL문 연동 및 DML문 작성 /JFrame, JTextField, JLabel 생성) (0) | 2014.12.16 |
---|---|
7일차 Student.sql (샘플DB 생성, JAVA와 연동) (0) | 2014.12.16 |
6일차 DB.sql (쇼핑몰 SQL문 문제풀기 : 모든문제 완료, 서브쿼리&조인) (0) | 2014.12.15 |
5일차 DB.sql (쇼핑몰 SQL문 문제풀기 : 1~2문제까지 완료) (0) | 2014.12.12 |
5일차 Shop_DB.sql (4일차 복습, 이중조인, 함수) (0) | 2014.12.12 |