이 유형의 데이터베이스에 익숙하지 않으며 psql을 지정하고 암호를 공백으로 입력하여 명령 줄을 통해 연결하려고합니다. 나는이 질문의 제목에서 위의 오류를 얻는다.psql fe_sendauth no password
기본 암호가 무엇인지 알지 못합니다.
pg_hba 파일 :
이C:\metasploit\postgresql\bin\pg_ctl -D "C:\metasploit\postgresql\myData" -l logfile start
내가 원하는 모든 데이터베이스를 입력하고 비밀번호를 변경하는 것입니다 :
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)
내가 서버 이런 식으로 다시 시작
IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
host replication DIMA 127.0.0.1/32 trust
host replication DIMA ::1/128 trust
postgresql.config . 그리고 바람직하게는 PgAdmin-III를 입력하십시오 (GUI 형식)
이 오류도 발생합니다. 데이터베이스를 다시 시작하는 것과 아무런 관련이 없습니다. PG는 'psql --username = postgres --host = localhost'로 암호를 요구하지만'psql --username = postgres'로 암호를 묻지 않습니다. 단 두 개는 논리적으로 동일해야합니다. – Cerin
@Cerin 두 개는 유닉스 소켓을 지원하는 플랫폼에서는 동일하지 않습니다. 후자는 TCP/IP를'localhost'가 해결하는 IP 주소로 사용합니다. 전자는'psql --username = postgres --host =/var/run/pgsql' (또는'unix_socket_directory'가 어디에 있든)을 말하는 것과 같습니다. 나는 그 사용자 인터페이스를 많이 좋아하지 않지만 실제로 변경 될 수는 없다. Windows에서는 유닉스 소켓을 지원하지 않기 때문에 동등한 것입니다. –