PG::Error: ERROR: permission denied to create database

使用普用户创建数据库时候
PG::Error: ERROR: permission denied to create database

解决方式:
使用postgres 登录
sudo -u postgres psql

postgres=# ALTER ROLE xxxx CREATEROLE CREATEDB;

xxxx: 普通用户名称

赋予超级权限
ALTER ROLE xxxx CREATEROLE SUPERUSER;

http://www.postgresql.org/docs/9.2/static/sql-alterrole.html


猜你喜欢

转载自amspring.iteye.com/blog/2192293