Heroku Postgresql 与 Google Datastudio [英] Heroku Postgresql with Google Datastudio

查看:25
本文介绍了Heroku Postgresql 与 Google Datastudio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法将现有的 heroku 数据库连接到 Google Datastudio.我正在尝试添加连接,但得到以下信息:

I'm having troubles to connect an existing heroku database to Google Datastudio. I'm trying to add the connection and I get the following:

访问被拒绝,请检查您的用户名和密码.

Access denied, please check your username and password.

现在,我 100% 确定我在这些凭据上是正确的,并且问题来自其他地方.

Now, I'm 100% sure that I'm correct on those credentials and the problem comes from somewhere else.

我尝试了不同的设置,无论是免费的还是付费的 PSQL 实例,都没有效果.

I've tried with different setup, either a free or a paid PSQL instance, nothing works.

我还在 elephantsql 上设置了一个虚拟帐户,并且第一次连接没有任何问题.

I've also setup a dummy account on elephantsql and the connection worked the first time without any issue.

你知道这个问题的原因吗?

Do you have any idea of the cause of that problem?

刚刚找到 https://www.en.advertisercommunity.com/t5/Data-Studio/Heroku-Postgres-lt-gt-Google-Data-Studio/mp/1031729 在撰写本文时没有帮助这个帖子.

Just found https://www.en.advertisercommunity.com/t5/Data-Studio/Heroku-Postgres-lt-gt-Google-Data-Studio/m-p/1031729 which is not helpful at the time of writing this post.

推荐答案

自从 2018 年 2 月 6 日更新,Google DataStudio 允许与 PostgreSQL 的 SSL 连接,这是连接到通过 Heroku 创建的数据库所必需的.

Since the February 6, 2018 update, Google DataStudio allows SSL connections with PostgreSQL, which is necessary to connect to a database created via Heroku.

要启用 SSL,您需要提供客户端密钥+证书和服务器证书,可以通过以下步骤完成:

To enable SSL you need to provide client key+cert and server cert, which can be accomplished by taking the following steps:

  1. 使用 openssl 为客户端密钥 + 证书生成自签名证书 + 密钥:

openssl req 
       -newkey rsa:2048 -nodes -keyout client.key 
       -x509 -days 365 -out client.crt

  1. 使用 postgres_get_server_cert.py 脚本从 heroku psql 获取自签名服务器证书:
  1. Use the postgres_get_server_cert.py script to get the self-signed server cert from heroku psql:

https://raw.githubusercontent.com/thusoy/postgres-mitm/master/postgres_get_server_cert.py

这篇关于Heroku Postgresql 与 Google Datastudio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆