Postgres가 openBSD와 어떻게 작동하는지 이해할 수 없습니다. debian (initdb를 할 필요가 없음)에 이러한 문제가 없었습니다.Postgresql과 OpenBSD 최초 연결
pkg_add postgresql-server php-pgsql
su - _postgresql
initdb -D /var/postgresql/data -U postgres - E UTF8 -A md5 -W
그러나 그 후, 나는
이내가
pg_ctl -D /var/postgresql/data/ -l logfile start
또는
와 데이터베이스를 시작할 수 있습니다 기대하는 결과가 없습니다를 따를 때은 내가 그랬어
rcctl enable postgresql
rcctl start postgresql
는 _postgresql 사용자의 왜
# su - _postgresql
$ psql
Password:
psql: FATAL: password authentication failed for user "_postgresql"
하지가 POSTGRES : 내가 할 경우 있기 때문에
에 연결하는 방법을 이해하지? 어떤 암호를 사용해야합니까?
이가있는 pg_hba.conf입니다, 내가 끝을 변경,
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32
password
# IPv6 local connections:
host all all ::1/128 md5
그래서이와, 내 생각, 내가 로그인있어하지만 난 새로운 probleme이 정말 이해가 안 뭔가가있다
$ pg_ctl -D /var/postgresql/data/ -l logfile stop
waiting for server to shut down.... done
server stopped
$ pg_ctl -D /var/postgresql/data/ -l logfile start
server starting
$ psql
psql: FATAL: role "_postgresql" does not exist
감사
(unix-) 사용자 이름에 앞선 unde rscore, postgres-username은 그렇지 않습니다. 사용자 이름을 제공하지 않으면 psql은 unix-username을 사용한다고 가정합니다. 'psql -U postgres'는 아마도 당신이 원하는 것을 할 것입니다. – wildplasser
감사합니다 !! 좋아 보인다! 내일 더 보게됩니다. –