Database Setup

The following instructions may differ for different versions of Oracle or when container databases are used. Please follow the database manuals for specific scenarios.

The Docker images automatically keep the database schema up-to-date using Liquibase. Whenever you install the application or update it to a new version, the container updates the DB schema. On application downgrade, the changes are rolled back automatically (losing information specific for the new versions). Therefore, you only need to follow this documentation when you are installing and setting up the database from scratch.

Install Oracle Database

To get started, download and install the current version of Oracle database:

Start the database and connect to it using your preferred database tool.

Tip: We use DataGrip by JetBrains for any database related tasks. It allows easy data editing for all popular database engines and contains a powerful SQL console for even the most complex database tasks.

Create User

Start by creating the powerauth user in the database and by setting the user a strong password.

Tip: You can generate a strong password locally on your computer using openssl rand -base64 12.

CREATE USER powerauth IDENTIFIED BY "$PASSWORD$";
GRANT CONNECT, RESOURCE TO powerauth;

Create Tablespace

Create a tablespace for the powerauth user.

CREATE TABLESPACE powerauth DATAFILE 'path_to_datafile' SIZE 100M AUTOEXTEND ON;
ALTER USER powerauth DEFAULT TABLESPACE powerauth QUOTA UNLIMITED ON powerauth;

Assign Privileges

GRANT ALL PRIVILEGES TO powerauth;

You can assign more granular privileges instead of using ALL PRIVILEGES, if required for security reasons.

This is everything you need at this moment. Once the database is up and running with the right user and database, you can launch the Docker container. The Docker container uses Liquibase to create the schema automatically.

Last updated on Aug 23, 2024 (11:27) View product
Search

develop

PowerAuth Cloud