2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windows+PostgreSQL 外部からのアクセスを可能にする

Last updated at Posted at 2016-10-31

設定ファイル編集

  • C:\Program Files\PostgreSQL\9.6\data\pg_hba.conf
# TYPE  DATABASE        USER            ADDRESS                 METHOD

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5

この下に接続したいIPを追加する。

host    all             all             192.168.1.1/32          md5

/32 はCIDR表記。単一ホストだけを指定する場合は /32 でよい。
書き換えたらPostgreSQLを再起動する。

ポート開放

デフォルトでは 5432 を使用することになっているので、Windows側でそのポートを開放する。
http://symfoware.blog68.fc2.com/blog-entry-1231.html

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?