3

I created a PostgreSQL server on Azure, but I am not able to connect to it from R. I am able to connect to it using pgadmin though

drv <- dbDriver("PostgreSQL")
con <- dbConnect(drv, user='xxx@azure-postgres', password='xxxxx', 
             dbname='dbname=postgres',
             host='azure-postgres.postgres.database.azure.com', 
             port = '5432')

If I have SSL Enabled in Azure, I am getting the following error in R FATAL: SSL connection is required. Please specify SSL options and retry

I tried various variations to the parameters for dBConnect: 'dbname=postgres sslmode = allow' but did not help. I got the same error. When I use 'dbname=postgres ssl = true' R session crashed.

I have currently disabled SSL in Azure for now, and it is working. Is there any other option that I have.

Thanks.

let_there_be_light
  • 837
  • 3
  • 9
  • 15

0 Answers0