Database

The primary database used by InterDiode is PostgreSQL (from 14 to 18), MySQL (8.0.11 to 9.6) or MariaDB (from 10.6 to 12.3). It is used to store all the data related to users, permissions, resources, and transfers.

PostgreSQL is the default database and is recommended for production use due to its robustness, performance, and advanced features. MySQL and MariaDB are also supported as alternatives.

If the database is hosted on a different server than InterDiode, make sure that the database server is accessible from the InterDiode server and that the necessary ports are open. An SSL/TLS connection is strongly recommended to secure communications between InterDiode and the database if they are hosted on different servers.

PostgreSQL setup

Recommended settings for PostgreSQL include:

  • client_encoding: 'UTF8',

  • default_transaction_isolation: 'read committed',

  • timezone: 'UTC'.

Create a user and a database with UTF-8 charset and case-sensitive collation (C is a common collation for PostgreSQL) and grant all privileges on the database to the user created first.

CREATE ROLE "user-interdiode" WITH LOGIN PASSWORD 'password-interdiode';
CREATE DATABASE "database-interdiode" WITH OWNER "user-interdiode" ENCODING 'UTF8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8' TEMPLATE template0;
GRANT ALL PRIVILEGES ON DATABASE "database-interdiode" TO "user-interdiode";

MySQL/MariaDB setup

Recommended settings for MySQL/MariaDB include to use the InnoDB storage engine, which is fully transactional and supports foreign key references.

Create a user and a database with UTF-8 charset and case-sensitive collation (utf8mb4_bin is a common collation for both MySQL/MariaDB) and grant all privileges on the database to the user created first.

SET old_passwords=0;
CREATE USER 'user-interdiode'@'%' IDENTIFIED BY 'password-interdiode';
CREATE DATABASE database-interdiode CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin';
GRANT ALL PRIVILEGES ON database-interdiode.* TO 'user-interdiode';
FLUSH PRIVILEGES;