Configuring MariaDB Databases

  • Last update:March 26, 2025
  • Overview

    Version

    Report Server VersionPlugin VersionFunctional Change

    11.0

    V1.0.0

    /

    Function Description

    The report system in which you configure external databases can be more stable in cluster environments or situations with large amounts of data.

    You can configure external MariaDB databases by installing the Data Migration to MariaDB plugin in the decision-making system.

    iconNote:
    Do not modify the usernames and passwords of the external databases configured. Otherwise, the project will fail to start.

    Notes

    For the report project configured with a virtual directory, namely the decision-making system accessed directly via IP address in Tomcat, you need to modify the server configuration file before installing the project. Open the server.xml file in %tomcat_home%\conf, and modify the value of reloadable to false (namely, reloadable=false), as shown in the following figure.

    1.png

    External Database Preparation

    Prepare a database (empty database advised to be created) to which the platform data will be migrated. (For details about the database size, see section "Hardware Configuration.")

    iconNote:
    Different FineReport projects cannot share the same external database. Otherwise, data may become disordered.

    Version/Driver

    Supported Database Version
    Driver Package

    MariaDB 5.5 and later versions, including MariaDB 10.x (such as 10.1, 1.0.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, and 10.11)

    Built-in MariaDB driver (free of manual upload)

    Hardware Configuration

    Configuration TypeMinimum ConfigurationRecommended Configuration

    Memory

    1 GB

    2 GB

    CPU

    4 cores

    8 cores

    Network speed

    50 Mbps

    100 Mbps

    FineDB-occupied space

    1 GB

    2 GB

    Server disk space

    100 GB

    200 GB

    Disk read/write speed

    50 MB/s

    100 MB/s


    iconNote:

    1. You need to modify the occupied space according to the usage rate. You can configure the space to be one to two times larger than the size of the finedb folder in webapps/webroot/WEB-INF/embed (estimated size based on the actual size).

    2. You are advised to use the memory reserved for the project configuration database.

    3. The external database needs to be in the same network segment as the report project to avoid network fluctuations.

    External Database Configuration

    Plugin Installation

    You can obtain the plugin at https://community.finereport.com/plugin/?id=128.

    For details about how to install the plugin in the designer, see Designer Plugin Management.

    For details about how to install the plugin on the server, see Server Plugin Management.

    External Database Configuration Entry

    Log in to the decision-making system as the admin, and choose System Management > System Setting > General > General Parameter > External Database > To Be Configured, as shown in the following figure.

    2.png

    External Database Configuration

    After entering the external database configuration page, select the database type and enter the corresponding information of the actual database, as shown in the following figure.

    3.4.png

    Setting Item

    The following table describes the setting items.

    Setting Item
    Description

    Database Type

    Select mariadb.

    Driver

    Retain the default setting. This parameter will be automatically set, requiring no modification.

    Database Name

    For details, see the database name in section "External Database Preparation."

    iconNote:

    1. Your project must not share the database with other projects. You are advised to create a database.

    2. The database name can contain only numbers, letters, underscores, and periods (.).

    Username/Host/Password/Port

    Set these parameters according to the actual database information.

    iconNote:

    1. The host name can contain only numbers, letters, underscores, hyphens (-), and periods (.).

    2. You need to have the createdeletealterupdateselectinsert, and index permissions.

    Migrating Data to the Database to Be Enabled

    You can determine whether to select Migrate Data to Database to Be Enabled based on your own needs. The following describes the details:

    1. Select Migrate Data to Database to Be Enabled when the new external database is empty.

    After you click Enable New Database, the platform data of the original FineDB database will be migrated to the new external database.

    2. Select Migrate Data to Database to Be Enabled when the platform data already exists in the new external database.

    After you click Enable New Database, the message "The platform data already exists in the database. Before data import, the original platform data will be cleared. Sure to connect to the database?" pops up.

    After you click OK, the original platform data will be cleared, and the platform data of the original FineDB database will be migrated to the new external database.

    a.png

    3. Deselect Migrate Data to Database to Be Enabled when the new external database is empty.

    After you click Enable New Database, the message "The target database is a new database and can be used after the current data is migrated to the target database." pops up.

    After you click OK, the platform data of the original FineDB database will be migrated to the new external database.

    b.png

    4. Deselect Migrate Data to Database to Be Enabled when the platform data already exists in the new external database.

    After you click Enable New Database, the project will automatically detect whether the JAR package version corresponding to the data in the target database is consistent with that in the current project.

    • If the versions are inconsistent, the message "Unable to enable it. Project version required to enable the new database: xxx Current project version: xxx Ensure that the project version is consistent." is displayed. In this case, you fail to configure external databases.

    c.png

    • If the JAR package versions are consistent and the original FineDB database is a built-in database, the new external database is enabled directly.

    • If the JAR package versions are consistent and the original FineDB database is an external database, the configuration information of the original database is automatically backed up before migration (as result of which the db.properties.bak file is generated in webapps\webroot\WEB-INF\config), and the new external database is enabled directly, as shown in the following figure.

    d.png

    Successful Migration

    Wait until the migration is successful. Different pop-up prompts may appear depending on the migration situation.

    1. New external database using data of the original FineDB database

    The message "The target database has been enabled successfully." pops up. Click OK to complete the migration, as shown in the following figure.

    e.png

    2. New external database using data of the original FineDB database (which is a built-in database)

    The message "Successfully switched to the target database. If data is different between the old and new databases, system running may be affected. You are advised to restart the project for normal use." pops up.

    Click OK and restart the report project to complete the migration, as shown in the following figure.

    f.png

    3. New external database using data of the original FineDB database (which is an external database)

    The following two messages pop up:

    • The message "Successfully switched to the target database. If data is different between the old and new databases, system running may be affected. You are advised to restart the project for normal use." pops up.

    • The original database configuration has been backed up to the config folder. You can use the backup file to restore the database configuration if necessary.

    Click OK and restart the report project to complete the migration, as shown in the following figure.

    g.png

    Deleting Built-in Database Data Connections

    The built-in FineDB database is an HSQL database that creates an in-memory database when used. A large amount of memory will be occupied when the data volume is large.

    Therefore, after configuring the external database, check whether a data connection exists for the built-in FineDB database in Data Connection Management.

    If a data connection exists, delete the data connection in time. Otherwise, the connection will continue to occupy server memory.

    Attachment List


    Theme: Decision-making Platform
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy