we are going to create a new database user and a new database.
We will use the createuser and createdb commands.
These are installed with the PostgreSQL database.
$ sudo -u postgres createuser -W user12
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
Password:
We create a new database user. The user is called user12 and it is
created with a password (-W option).
$ sudo -u postgres createdb testdb -O user12
We create a new testdb database. We will use this database throughout
the tutorial. We set the new user to be the owner of the database (the -O option).
阅读(6701) | 评论(0) | 转发(0) |