postgres
has created a postgresql user foo
,
$ sudo -u postgres createuser -d -P foo
Enter password for new role: foo
Enter it again: foo
Can foo
create a database, let us say foo
?
asked Apr 29, 2014 at 15:42
1 Answer 1
http://www.postgresql.org/docs/current/static/app-createuser.html
-d --createdb The new user will be allowed to create databases.
So as you have used the -d parameter the user foo should have the permission to create databases like this:
createdb -h localhost -U foo foos_db
answered Apr 29, 2014 at 16:22
1 Comment
ericj
I know. I used that option. What is the command by which
foo
creates the database?lang-sql
psql -U foo
then runcreate database