我在
Windows 7 64位的R 2.15.2上使用RPostgresql 0.4库(在R 2.15.3上编译)来连接到Postgresql.这在连接到localhost上的Postgresql数据库时工作正常.我正在尝试使用Heroku上的远程Postgresql数据库运行我的R代码.我可以从我的机器上的psql命令shell连接到Heroku的Postgresql数据库,它连接没有问题.我收到消息:
psql (9.2.3,server 9.1.9) WARNING: psql version 9.2,server version 9.1. Some psql features might not work. WARNING: Console code page (437) differs from Windows code page (1252) 8-bit characters might not work correctly. See psql reference page "Notes for Windows users" for details. SSL connection (cipher: DHE-RSA-AES256-SHA,bits: 256)
显然,psql使用SSL进行连接.当我尝试使用RPostgresql库例程dbConnect()进行连接时,使用dname =,host =,port =,user =,password =提供完全相同的凭据时,连接失败并出现投诉:
Error in postgresqlNewConnection(drv,...) : RS-DBI driver: (Could not connect <user>@<hostname> on dbname <dbname>) Calls: source ... .valueClasstest -> is -> is -> postgresqlNewConnection -> .Call Execution halted
我知道如果你想远程访问他们的数据库,Heroku坚持使用SSL连接,所以Rinter接口例程dbConnect()似乎没有尝试SSL.我还能做些什么来从Heroku上的R到Postgresql的远程连接工作吗?
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。