Skip to main content
Skip table of contents

Setup and Configuration MariaDB (Debian/Ubuntu)

Introduction

To use Pathfinder with the open-source MariaDB database system, a first-time installation and configuration must be completed. This process consists of the following steps:

  1. Download and install the MariaDB package

  2. Perform initial MariaDB configuration

  3. Create a database and user for Pathfinder

  4. Configure external access

  5. Apply optional settings


Step 1 – Download and Install MariaDB

Step 1.1 – Install via Package Sources (Online)

Before installation, verify that a current version of mariadb-server is available in the system’s package sources by running the following command:

CODE
sudo apt list mariadb-server 

If no current package is available for the distribution, or if it is outdated, proceed with the alternative method in Step 1.2.

To install the package, run:

CODE
sudo apt install mariadb-server 

Confirm the installation with y when prompted. Installation time may vary based on server performance and network speed.

Tip: On systems with a graphical interface, a package manager may also be used to check the available MariaDB versions.


Step 1.2 – Manual Installation via Website (Offline/Alternative)

If no suitable package is available via the distribution's repositories, the latest version of MariaDB can be downloaded manually from the official website.

Refer to the official documentation for instructions:
🔗 https://mariadb.com/kb/en/installing-mariadb-deb-files/

After installation, continue with Step 2.


Step 2 – Initial Configuration of MariaDB

Once installed, secure the MariaDB instance using the built-in setup tool:

CODE
sudo mysql_secure_installation 

This interactive script assists with the following tasks:

  • Set a root password

  • Remove anonymous users

  • Disallow root login from remote machines

  • Remove the default test database

After completion, access the MariaDB shell:

CODE
sudo mariadb 

Authentication may be required. A prompt will appear: MariaDB>


Step 3 – Create Database and User for Pathfinder

Create an empty database by entering the following command in the MariaDB prompt. Replace DB_NAME with the desired name:

CODE
create database DB_NAME; 

Next, create a non-root user account for Pathfinder to access the database:

CODE
grant all privileges on DB_NAME.* TO 'USER_NAME'@'%' identified by 'PASSWORD'; 

Replace DB_NAME, USER_NAME, and PASSWORD with appropriate values. These credentials will later be used to configure Pathfinder’s database connection.

Apply the changes and exit the shell:

CODE
flush privileges; exit; 


Step 4 – Configure External Access

To allow remote access to the MariaDB server, adjust the IP binding in the server configuration file. Open the following file:

CODE
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf 

Locate the line:

CODE
bind-address = 127.0.0.1 

Change 127.0.0.1 to the actual IP address of the server.


Step 5 – Additional Configuration (Optional)

Firewall Configuration

MariaDB listens on port 3306 by default. If a firewall is enabled on the server, ensure that this port is open to allow connections from Pathfinder.

Handling Large Document Files in the Database

Pathfinder allows files to be linked or directly stored in the database. By default, MariaDB supports file sizes up to 16 MB.

To increase the allowed file size, update the max_allowed_packet value in the MariaDB configuration:

CODE
sudo mariadb 

Then execute the following command within the MariaDB prompt (replace SIZE with the desired value in bytes):

CODE
set global max_allowed_packet=SIZE; 

Example for 32 MB:

CODE
set global max_allowed_packet=33554432; 


Conclusion

MariaDB has now been successfully installed and configured. The database is ready to be connected to Pathfinder. For the next steps, refer to Configure the Client-Database Connection.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.