Skip to content

Create and manage databases for MariaDB

Last updated on

This guide describes how you can add custom databases to your MariaDB instance. However, it is important to mention, that there is always a default database. It has the same name as the instances deployment name and it will exist regardless of that parameter value.

  1. Open your project in the STACKIT Portal.

  2. Navigate to Databases > MariaDB.

  3. Choose your instance and go to the overview.

  4. In the Custom parameters panel, click on Edit.

  5. Edit JSON input to define your new databases.

    Add a new key-value-pair to the existing object where the key name is databases. The value is an array of strings that defines all databases.

    This is the syntax of a key, that defines two additional databases.

    "databases" : "[custom-database1-name]", "[custom-database2-name"]

    A complete definition of two additional databases named db1 and db2 could look like this example:

    {
    "max_disk_threshold": 80,
    "sgw_acl": "192.168.0.0/24,192.168.1.0",
    "databases" : ["db1", "db2"]
    }
  1. Open your project in the STACKIT Portal.

  2. Navigate to Databases > MariaDB.

  3. Choose your instance and go to the overview.

  4. In the Custom parameters panel, click on Edit.

  5. Edit JSON input to define which databases should be dropped.

    Do drop a database, you need to edit the database-key. Because of its declarative character you need to omit the database, you want to drop, in the definition of databases. Refer to Create a database for the syntax of the key. To drop all custom databases, remove the database-key entirely. Double check, that you don’t omit databases, that you want to keep.