Log in as the database superuser, for example, postgres.
# su - postgres |
Create the owner of the database.
> createuser -P arco_write Enter password for new user: Enter it again: Shall the new user be allowed to create databases? (y/n) y Shall the new user be allowed to create more new users? (y/n) n CREATE USER |
Create the database for accounting and reporting.
> createdb -O arco_write arco CREATE DATABASE |
Create a database user for reading the database.
If you do not use the arco_read user, you need to modify the privileges script that is used in the next step.
> createuser -P arco_read Enter password for new user: Enter it again: Shall the new user be allowed to create databases? (y/n) n Shall the new user be allowed to create more new users? (y/n) n CREATE USER |