Software AG Products 10.7 | Administering API Portal | Configuring API Portal | Configuring API Portal with External Databases | Configuring API Portal with a Postgres Database | Creating Postgres Database and User
 
Creating Postgres Database and User
You must create the database in Postgres, create a user and assign privileges to the user.
1. Launch PostgresSQL.
2. Run the following command to create a database:
create database databasename;
For example,
create database postgresdb;
Note:
You can use DbVisualizer to ensure that the schemas are created.
3. Run the following command to create a user:
CREATE USER username WITH ENCRYPTED PASSWORD '*password'
For example,
CREATE USER dbuser WITH ENCRYPTED PASSWORD '*ARIS!1dm9n#'
4. Run the following command to assign all privileges to the user:
GRANT ALL PRIVILEGES ON DATABASE databasename TO username;
For example.
GRANT ALL PRIVILEGES ON DATABASE postgresdb TO dbuser;