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.

2
  • Could you try adding sslmode=require as in this answer: stackoverflow.com/a/33179039 ? Commented Dec 27, 2017 at 13:47
  • 1
    sslmode=require didn't work. Commented Jan 3, 2018 at 7:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.