postgres
创建了一个postgresql用户foo
,
$ sudo -u postgres createuser -d -P foo
Enter password for new role: foo
Enter it again: foo
可以foo
创建数据库吗,让我们说foo
?
答案 0 :(得分:2)
http://www.postgresql.org/docs/current/static/app-createuser.html
-d --createdb 将允许新用户创建数据库。
因为你使用了-d参数,用户foo应该拥有create databases这样的权限:
createdb -h localhost -U foo foos_db