LoginSignup
1
0

More than 5 years have passed since last update.

Data studioにHeroku postgresを接続しようとしてハマったメモ

Posted at

Data studioからHerokuのpostgresに接続しようとしたところ、

Access denied, please check your username and password.

とのこと。

結論SSL接続が必要だった。

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

でオレオレ証明書を作成。common nameはpostgresのホスト名を設定。

下記pythonのソースを拝借し、実行。
https://raw.githubusercontent.com/thusoy/postgres-mitm/master/postgres_get_server_cert.py

python postgres_get_server_cert.py {heroku-postgres-host}:{port} > heroku-cert.crt

それぞれ出力されたファイルをアップロードする。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0