
windows7にanacondaをインストールして仮想環境作成し、
djangoとpostgresqlを接続したいのですが、
管理画面よりpostgresqlインストールし、psqlコマンドはうてるものの、
プロンプトでpsqlとうつと下記エラーが表示されます。
psql:could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
設定ファイルかと思い下記フォルダ内の postgresql.conf.sample をコピーし postgresql.conf としportのコメントアウトを解除し再起動するも変わらず。
C:\ProgramData\Anaconda3\envs\django_test_201810\Library\share postgresql.conf.sample port = 5432 # (change requires restart)
ファイアーウォールのport5432開けるも変わらず、
試しにファイアーウォールとウィルスソフトを無効にするも変わらずと、手詰まり感がでてきております。
windows7でpostgresqlが接続できる方法やサイトがもしあれば、教えていただけませんでしょうか。
追記しました。
メッセージありがとうございます、
pg_hba.confは下記になっておりました。
@authcomment@
TYPE DATABASE USER ADDRESS METHOD
@remove-line-for-nolocal@# "local" is for Unix domain socket connections only
@remove-line-for-nolocal@local all all @authmethodlocal@
IPv4 local connections:
host all all 127.0.0.1/32 @authmethodhost@
host all all 127.0.0.1/32 password
IPv6 local connections:
host all all ::1/128 @authmethodhost@
Allow replication connections from localhost, by a user with the
replication privilege.
@remove-line-for-nolocal@local replication all @authmethodlocal@
host replication all 127.0.0.1/32 @authmethodhost@
host replication all ::1/128 @authmethodhost@



回答1件
あなたの回答
tips
プレビュー