pgAdmin을 사용하여 Rails 앱용 데이터베이스에 연결하는 데 문제가 있습니다. 서버가 실행 중이고 pgAdmin에서 서버 속성이 올바르다 고 생각합니다. 내가 무슨 여기 pgAdmin 서버 속성입니다 :pgAdmin을 사용하여 Rails 앱 Postgres DB에 연결
development:
adapter: postgresql
host: localhost
username: achievenext
password: ******
database: achievenext_dev
하지만 연결하려고 할 때 pgAdmin이 오류를 반환 :
Name: achievenext_dev
Host: localhost
port: 3000
SSL:
Maintenance DB: postgres
username: achievenext
password: ******
Store password: true
Restore env?: true
DB Restriction:
Service:
Connect now: true
그리고 내 database.yml을 파일에
An error has occurred:
Error connecting to the server: server closed the connection unexpectedly. This probably means the server terminated abnormally before or while processing the request.
그러나 내 서버에 오류가 없습니다. 잘 돌아가고있는 것 같습니다. 내가 여기서 잘못하고있는 것을 알아낼 수는 없다.
Danny에게 감사드립니다. localhost 대신 127.0.0.1을 사용했지만 그 중 하나도 작동하지 않았습니다. –
호스트 : localhost 대신 127.0.0.1이 내 Mac에서 작동했습니다. 이 팁을 주셔서 감사합니다. –