import java.sql.*;
public class postgrestest
{
public static void main(String[] args){
try
{
Class.forName("org.postgresql.Driver");
String url=new String("jdbc:postgresql://175.199.234.68:5432/mydb");
Connection con=DriverManager.getConnection(url,"shimsh","123572");
}
catch(ClassNotFoundException cnfe)
{
System.err.println("ff"+cnfe);
}
catch(SQLException sqle)
{
System.err.println("ss"+sqle);
}
}
}
FATAL: no pg_hba.conf entry for host "175.199.141.68", user "shimsh", database "mydb", SSL off
pg_hba.conf에
hostssl all all 0.0.0.0/0 md5
|