私postgreSQL.conf
のように見えます
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432 # (change requires restart)
そして私はpostgresが実行されていることも知っています
air:data postgres$ ps -aef | grep postgres
504 16474 16473 0 11:34AM ?? 0:00.00 postgres: logger process
504 16476 16473 0 11:34AM ?? 0:00.00 postgres: writer process
504 16477 16473 0 11:34AM ?? 0:00.00 postgres: wal writer process
504 16478 16473 0 11:34AM ?? 0:00.00 postgres: autovacuum launcher process
504 16479 16473 0 11:34AM ?? 0:00.00 postgres: stats collector process
0 16087 16078 0 10:54AM ttys001 0:00.03 su - postgres
504 16473 1 0 11:34AM ttys001 0:00.22 /Library/PostgreSQL/9.1/bin/postgres -D/Library/PostgreSQL/9.1/data
504 16484 16088 0 11:34AM ttys001 0:00.00 grep postgres
でも接続できません
psql -Uuser -W
Password for user user:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
また、私が以下を実行すると
lsof -i tcp:5432
✘ me@air11:37:13 ⮀ ~ ⮀ netstat -a | grep postgres
tcp6 0 0 *.postgres *.* LISTEN
tcp4 0 0 *.postgresql *.* LISTEN
何port 5432
が欠けているのですか?
アップデート
私pg_hba.conf
のように見えます
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5