fe_sendauth: 암호가 제공되지 않았습니다.
데이터베이스yml:
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: postgresql
encoding: utf8
database: sampleapp_dev #can be anything unique
#host: localhost
#username: 7stud
#password:
#adapter: sqlite3
#database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: postgresql
encoding: utf8
database: sampleapp_test #can be anything unique
#host: localhost
#username: 7stud
#password:
#adapter: sqlite3
#database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: postgresql
database: sampleapp_prod #can be anything unique
#host: localhost
#username: 7stud
#password:
#adapter: sqlite3
#database: db/production.sqlite3
pool: 5
timeout: 5000
pg_pg.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 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres md5
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
처음 세 줄의 Method를 md5에서 trust로 변경했는데 아직도 오류가 발생합니다.
그리고 database.yml에서 어떤 조합을 시도하든 다음과 같은 작업을 수행합니다.
~/rails_projects/sample_app4_0$ bundle exec rake db:create:all
항상 오류가 발생합니다.
fe_sendauth: 암호가 제공되지 않았습니다.
이 튜토리얼에 따라 설정했습니다.
https://pragtob.wordpress.com/2012/09/12/setting-up-postgresql-for-ruby-on-rails-on-linux
Mac OSX 10.6.8
PostgreSQL 9.2.4 installed via enterpriseDB installer
Install dir: /Library/PostgreSQL/9.2
변경한 후pg_hba.conf
또는postgresql.conf
파일. 변경 사항을 적용하려면 클러스터를 다시 로드해야 합니다.
명령줄에서:pg_ctl reload
데이터베이스 내에서(슈퍼 사용자로서): select pg_reload_conf();
PGAdmin: db name을 마우스 오른쪽 버튼으로 클릭하고 "Reload Configuration"을 선택합니다.
참고: 다시 로드는 보관 활성화, 변경과 같은 변경 사항에 충분하지 않습니다.shared_buffers
등 - 클러스터를 다시 시작해야 합니다.
그냥 넣었습니다.--password
내 명령에 플래그를 지정하고 Enter 키를 누른 후 암호를 요청하여 제공했습니다.
psql -U postgres --password
Password:<Enter your password>
그러면 이런 내용이 나옵니다. postgres=#
이것은 나에게 효과가 있었습니다.
데이터베이스에 대한 암호가 지정되지 않은 경우 이 문제가 발생합니다.
default="postgres://postgres:password@127.0.0.1:5432/DBname"
database.yml 파일에서 개발, 테스트 및 제작 후 이 네 줄을 사용할 수 있도록 했습니다.보안을 위해 사용자 이름과 암호를 비워두지만 실제 응용 프로그램에서 이를 입력합니다.
username:
password:
host: localhost
port: 5432
저도 같은 문제가 있었습니다.하지만 제 애플리케이션은 도커 데몬에서 실행되고 있었습니다.저는 이러한 환경을docker-compose.yml
파일. 그리고 또한 변경되었습니다.database.yml
파일. 이러한 변경으로 문제가 해결되었습니다.
DATABASE_HOST= db
POSTGRES_PASSWORD= password
언급URL : https://stackoverflow.com/questions/17996957/fe-sendauth-no-password-supplied
'programing' 카테고리의 다른 글
UI 이미지 크기를 조정하는 가장 간단한 방법은 무엇입니까? (0) | 2023.05.18 |
---|---|
MongoDB Change Streams로 인한 심각한 성능 저하 (0) | 2023.05.18 |
IIS 7, Windows 7에서 ASP.NET 4.0을 응용 프로그램 풀로 추가하는 방법 (0) | 2023.05.18 |
Eclipse에서 'querystring' 텍스트가 포함된 프로젝트의 모든 파일 검색 (0) | 2023.05.18 |
CQRS 읽기 시스템에 Azure Table Storage 또는 SQL Azure를 사용합니까? (0) | 2023.05.18 |