Skip to content

Instantly share code, notes, and snippets.

@taisyo7333
Last active March 17, 2017 07:14
Show Gist options
  • Save taisyo7333/6af37f1e284ac482a02eff49ac7fd49c to your computer and use it in GitHub Desktop.
Save taisyo7333/6af37f1e284ac482a02eff49ac7fd49c to your computer and use it in GitHub Desktop.
AWS ElasticBeansTalk Docker : リモートログインしてPostgresql に接続する手順

Postgresqlに接続するまでの手順

  1. log in docker container in ec2-user
  2. apt-get update
  3. apt-get install -y postgresql
  4. apt-get install -y dnsutils
  • this package is for nslookup
  1. nslookup xxxx.yyyyyy.us-west-2.rds.amazonaws.com
  2. psql -h <private-ip-address> -U <user-name> -d <database-name>

Postgresql Command

  • show timezone;
  • SELECT datname, pg_encoding_to_char(encoding) FROM pg_database;
@taisyo7333
Copy link
Author

docker exec -i -t e662539785ed bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment