使用R通过SSL连接到Postgres [英] Connect to Postgres via SSL using R
本文介绍了使用R通过SSL连接到Postgres的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个与此处相同的问题,连接到使用R
I have the same question that was asked here Connect to Redshift via SSL using R
但是,给出的答案需要证书验证.我想知道是否有没有证书验证的方法?当我通过sql客户端连接时,只需添加
However, the answer given requires certificate validation. I'm wondering if there is a way to do this without certificate validation? When I connect via a sql client, I just add this
?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
如何在R中添加这些参数?
How can I add these parameters in R?
在此先感谢您的帮助!
推荐答案
尝试将require
或allow
传递给sslmode
,而不是将verify-full
传递给sslmode
:
Instead of passing verify-full
to sslmode
, try require
or allow
:
dbConnect(dbDriver('PostgreSQL'),
dbname = 'dbname=foobar sslmode=require',
host = 'foobar.redshift.amazonaws.com',
port = 5439,
user = 'foobar',
password = 'foobar')
这篇关于使用R通过SSL连接到Postgres的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文