postgresql – fe_sendauth:没有提供密码
发布时间:2020-12-13 16:45:19 所属栏目:百科 来源:网络整理
导读: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 #u
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: # 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到信任的方法,但我仍然得到的错误。 无论什么组合的东西,我试图在database.yml,当我做: ~/rails_projects/sample_app4_0$ bundle exec rake db:create:all 我总是得到的错误:
我按照这个教程来设置事情: 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 从一个db(作为超级用户):select pg_reload_conf(); 从PGAdmin:右键单击db name,选择“Reload Configuration” 注意:重新加载不足以进行更改,如启用归档,更改shared_buffers等 – 需要群集重新启动。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- RO段、RW段和ZI段
- C# – 调整图像画布大小(保留源图像的原始像素尺寸)
- c# – 自定义授权属性不工作的asp.net
- class path resource [logConfig.xml] cannot be resolved
- Oracle_071_lesson_p17
- Oracle把逗号分割的字符串转换为可放入in的条件语句的字符数
- 对ary.product(other_ary, ...)方法的一点扩充
- ruby-on-rails – Rails安全性:完全避免大规模分配
- ExtJs的Ext.Ajax.request实现waitMsg等待提示效果
- c# – UserControl中的wpf绑定集合属性