我执行了。
$ GRANT ALL PRIVILEGES ON db1 to user1
$ ALTER USER user1 CREATEDB
$ ALTER USER user1 CREATEDB
$ ALTER USER user1 WITH 'pass'
但还是得到一个错误的信息
$ rails db:create
configdatabase.yml。
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see Rails configuration guide
# https://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
development:
<<: *default
database: pg_app_development
Linux Manjaro.Rails 6.0.2.2Ruby 2.7.1Pg 12.2
另外,我不想把超级用户信息放在数据库.yml中。
$ ALTER USER USER1 WITH CREATEDB