문제가 뭔지여..
다 제대로 한것 같은데..
다음과 같은 에러가 발생합니다. ^^;
====================================================================
드라이버 로딩~~~~~
Connection refused. Check that the hostname and port is correct, and that the po
stmaster is running with the -i flag, which enables TCP/IP networking.
at org.postgresql.Connection.openConnection(Unknown Source)
at org.postgresql.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at ForeignKeysCoffees.main(ForeignKeysCoffees.java:22)
DBconn.java========================================================
import java.sql.*;
public class DBconn{
public static void main(String args[]) {
Connection con;
try {
Class.forName("org.postgresql.Driver");
System.out.println("드라이버 로딩~~~~~");
con = DriverManager.getConnection
( "jdbc:postgresql://000.000.000.00:5432/jdbctest", "postgres", "");
System.out.println("커넥션 ~~~");
con.close();
} catch (Exception e) { e.printStackTrace(); }
}
}
|