Error while creating a connection in RPostgreSQL Package

sqldf
r
sql

#1

I am getting following error even after providing usernames, passwords using the following command

Error in postgresqlNewConnection(drv, …) :
RS-DBI driver: (could not connect 502620140@avw7hdm2p1.ae.ge.com on dbname “anhffp01”

con <- dbConnect(drv, host=“server”, port=‘port’, dbname=‘anhffp01’,user=Username, password=Pwd)

How to fix the above issue?


#2

Hi @Surya1987

the port seems wrong it is a string with number normally did you check with for example pgAdmin that it is the right port? Or your Db server is not up but this would be surprising

Hope this help.

Alain


#3

I put the port number as both Numeric and Character. Neither of the case worked.


#4

I had given the wrong password due to which it was not working properly


#5

oh oh this could happen
Alain