Foilen Cloud
Fran├žais

DB - MariaDB

Table of Content

Diagram of the Resources to Create

graph LR MariaDBUser -- CAN_READ --> MariaDBDatabase MariaDBUser -- CAN_WRITE --> MariaDBDatabase MariaDBUser -- CAN_ADMIN --> MariaDBDatabase MariaDBDatabase -- INSTALLED_ON --> MariaDBServer MariaDBServer -- RUN_AS --> UnixUser MariaDBServer -- INSTALLED_ON --> Machine

Diagram of the Generated Resources

The MariaDBServer creates an application which is installed on the chosen Machine and runs as the chosen UnixUser. Databases, users and their permission are put in a configuration file in the application and when it changes, a management application makes the changes in the database.

graph LR A[Application MariaDB] A -- RUN_AS --> UnixUser A -- INSTALLED_ON --> Machine

Create the Unix user of the database

  1. Go to Foilen Infra in the Plugin tab (https://infra.foilen.com/plugin/list) and click on Unix User
  2. Choose the owner
  3. Enter the name
  4. For Installed on, choose the machine
  5. Click on Create

Create the database server

  1. Go to Foilen Infra in the Plugin tab (https://infra.foilen.com/plugin/list) and click on MariaDB Server
  2. Choose the owner
  3. Enter the server name
  4. Put the version 10.5.6-1.1.1-3 or more recent (check via the link in the editor)
  5. For Running as, choose the previously created Unix user
  6. For Installed on, choose the same machine as the one where the Unix user is installed
  7. Click on Create

Create the database

  1. Go to Foilen Infra in the Plugin tab (https://infra.foilen.com/plugin/list) and click on MariaDB Database
  2. Choose the owner
  3. Enter the name of the database
  4. For Installed on, choose the MariaDB server
  5. Click on Create

Create the database user

  1. Go to Foilen Infra in the Plugin tab (https://infra.foilen.com/plugin/list) and click on MariaDB User
  2. Choose the owner
  3. Enter user name
  4. Enter password
  5. For Is admin on, choose the MariaDB database
  6. For Can read, choose the MariaDB database
  7. For Can write, choose the MariaDB database
  8. Click on Create

Create the database attachment

Used to attach a local redirect (e.g: 127.0.0.1:3306) to a database for Apache PHP sites as well as Composable Applications.

  1. Go to Foilen Infra in the Plugin tab (https://infra.foilen.com/plugin/list) and click on Attachable MariaDB
  2. Choose the owner
  3. Enter a name (the name of the MariaDB server is a good idea)
  4. Leave the default port at 3306
  5. For MariaDB Server, choose the MariaDB server