i have written a program:
#include<stdlib.h>
#include<libpq-fe.h>
#include<libpq-fe.h>
int main()
{
PGconn *myconnection = PQconnectdb("host = indra user = surabi password = test123 port = 5432 dbname=bpsimple");
if(PQstatus(myconnection) == CONNECTION_OK)
printf("Connection made\n");
else
printf("Connection failed : %s\n", PQerrorMessage(myconnection));
PQfinish(myconnection);
{
PGconn *myconnection = PQconnectdb("host = indra user = surabi password = test123 port = 5432 dbname=bpsimple");
if(PQstatus(myconnection) == CONNECTION_OK)
printf("Connection made\n");
else
printf("Connection failed : %s\n", PQerrorMessage(myconnection));
PQfinish(myconnection);
return 0;
}
}
from one host 3.70.201.172 , I try to
connect to a remote host "indra", that is running postgreSQL
server.
I ran the postmaster on "indra" like:
/usr/local/pgsql/bin/postmaster -h 3.70.201.172 -i
-D ./data/&
However i get this error
message
no pg_hba.conf entry for host "3.70.201.172",
user "surabi", database "bpsimple"
Please tell what to do?
regards
surabhi