MariaDB

Using MariaDB on your serverlet.

MariaDB is an open-source relational database system, a fork of MySQL. It offers MySQL compatibility along with extended features aimed at web applications, e-commerce solutions, and projects that need a robust relational database.

Note: MariaDB is an open-source database compatible with MySQL. Applications designed for MySQL usually work with MariaDB without modification.

For more information, see the official documentation.

First use

By default, MariaDB is disabled on the serverlet. You can enable it from the administration panel, on the serverlet’s Software tab (see Serverlet Control):

Or via the terminal:

plaintext
$ app enable mariadb

Starting MariaDB:

plaintext
$ app start mariadb

Creating and managing databases

Databases can be managed through the web interface, or over SSH/CLI using the Futrou DB Manager tool.

Administration (UI)

You can create a new database in Administration, on the serverlet’s Databases tab.

Futrou DB Manager (CLI)

Use the Futrou DB Manager tool to manage databases from the terminal:

plaintext
Futrou DB Manager
Usage: db {name} list
Usage: db {name} add {database_name} {password}
Usage: db {name} update {database_name} {new_password}
Usage: db {name} del {database_name}
Supported databases: mariadb, mongodb, postgresql
Example: db mariadb list

Commands:

  • db mariadb list β€” lists all databases
  • db mariadb add database_name password β€” creates a new database with a user and password
  • db mariadb update database_name new_password β€” updates the password for a database
  • db mariadb del database_name β€” deletes a database

Example:

plaintext
$ db mariadb add moje_db tajne_heslo

Control

Control MariaDB with:

plaintext
$ mysql

To connect to a specific database:

plaintext
$ mysql -D database_name

Configuration

All MariaDB configuration is stored in configuration files in the /srv/config/mariadb/ directory. The primary configuration file is my.cnf.

Last updated