fe_sendauth:未提供密码 [英] fe_sendauth: no password supplied

查看:109
本文介绍了fe_sendauth:未提供密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

database.yml:

database.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_hba.conf:

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            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

我将前三行中的方法从md5更改为Trust,但是仍然出现错误。

I changed the METHOD in the first three lines from md5 to trust, but I still get the error.

无论我尝试在数据库.yml中进行什么组合,当我这样做时:

And no matter what combinations of things I try in database.yml, when I do:

~/rails_projects/sample_app4_0$ bundle exec rake db:create:all

我总是会收到错误:


fe_sendauth:未提供密码

fe_sendauth: no password supplied

我按照本教程进行操作设置:

I followed this tutorial to get things setup:

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 文件,则需要重新加载集群以获取更改。

After making changes to the pg_hba.conf or postgresql.conf files, the cluster needs to be reloaded to pick up the changes.

从命令行: pg_ctl重新加载

从数据库中(以超级用户身份): select pg_reload_conf();

From within a db (as superuser): select pg_reload_conf();

从PGAdmin:右键单击数据库名称,选择重新加载配置

From PGAdmin: right-click db name, select "Reload Configuration"

注意:重新加载不足以进行诸如启用存档,更改 shared_buffers 等-那些需要重新启动群集。

Note: the reload is not sufficient for changes like enabling archiving, changing shared_buffers, etc -- those require a cluster restart.

这篇关于fe_sendauth:未提供密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆