[Linux][postgresql]postgresqlで、リモートアクセス環境を構築する
設定ファイルの編集
- /usr/local/pgsql/data/postgres.confの編集
下記記述行のコメントをはずす listen_addresses = '*' port = 5422
- /usr/local/pgsql/data/pg_hba.confの編集
下記行を追加する host all all 192.168.5.0 255.255.255.0 trust
postgreSQLの再起動
- 再起動コマンド
/usr/local/pgsql/bin/pg_ctl restart -D /usr/local/pgsql/data
pgAdminIII(Windows)の設定
- ファイル→サーバの追加
アドレス 192.168.5.12(postgresサーバのIPアドレス)
記述 postgresリモート(適当な名前でよい)
サービス 空白
Port 5422
SSL 許す
DBメンテナンス postgres
ユーザ名 postgres
パスワード パスワード
浙公网安备 33010602011771号