In FanRuan applications, you (the admin) typically configure users, mount directories, assign permissions, and set scheduling plans. All the configuration is stored in a configuration database.
In production environments, you can prepare a MySQL database to integrate with FanRuan applications for configuration storage. A stable external database ensures the reliable operation of FanRuan applications under high load.
There are multiple approaches for integrating FanRuan projects with a MySQL configuration database. This document mainly describes Solution 2 and Solution 3.
Solution 1
★★★★★
Deploy a new project without preparing a MySQL database. Only a server is required.
When deploying a project via FineOps, select Deploy Mysql8 in External Configuration Database. The platform automatically deploys a MySQL 8 configuration database and integrates it with the FanRuan project.
Solution 2
★★★
Deploy a new project with a self-prepared MySQL tablespace.
When deploying a project via FineOps, select Connect to Existing External Database in External Configuration Database, and enter the required information. The platform automatically connects to the database, enabling it as the configuration database upon successful deployment.
For existing projects, prepare a MySQL database and tune parameters.
Connect a deployed project to the configuration database.
You must prepare and deploy the MySQL database and tablespace.
FanRuan does not provide detailed guidance on database deployment. Only essential requirements are specified. Refer to the official MySQL documentation for additional assistance.
The following table lists FanRuan-tested environments.
Databases of earlier versions not mentioned are generally not supported or contain known issues; thus, they are not recommended.
You can test databases of higher versions that are not mentioned. If issues arise, premium customers can contact technical support. For details about how to contact technical support, see Technical Support Channel Introduction.
8.0.11, 8.0.16, 8.0.20, 8.0.21, 8.2
It refers to the memory allocated to the configuration database, not total server memory.
A dedicated server for the configuration database is recommended.
If resources are limited, ensure that no content other than the FanRuan application is deployed on the server hosting the configuration database, and ensure sufficient memory is allocated to the configuration database.
The configuration database, application, and other components should be on the same network segment to avoid network instability.
Ensure network connectivity and accessible ports between the configuration database, application, and other components.
Adjust it based on usage.
Allocate 1 to 2 times the recommended size of space.
Different FanRuan projects cannot share the same database tablespace as the configuration database. Otherwise, data corruption may occur.
Create a new tablespace specifically for storing configuration data in the database.
Do not store other data, such as business data or logs, in this tablespace.
1. Tablespace Name
You are advised to use an all-English tablespace name, for example, finedb. The tablespace name supports only letters, numbers, underscores (_), and dots (.).
2. Character Set
You are advised to upgrade both FineOps and FanRuan applications to the latest versions before connecting to MySQL 8 databases with the utf8mb4 character set.
1. Upgrade FineOps and FanRuan applications to the latest versions to support MySQL databases with utf8mb4 that have better compatibility (Recommended).
2. If upgrades are impossible:
Only utf8mb3 is supported.
utf8mb4 is not supported.
FineBI of V7.0 to V7.0.8
FineBI of V6.1 to V6.1.10
FineBI V6.0.25 and earlier
FineReport V11.5.7 and earlier
FineDataLink of V5.0 to V5.0.9.0
FineDataLink of V4.0 to V4.2.16.0
FineBI 7.0.9 and later (unreleased)
FineBI of V6.1.10 to V6.1.x (unreleased)
FineBI of V6.0.26 to V6.0.x (unreleased)
FineReport V11.5.8 and later
FineDataLink V5.0.9.1 and later
FineDataLink of V4.2.16.1 to 4.2.x
1. If the current project is connected to a utf8mb4 MySQL database:
The new configuration database must use utf8mb4 character set.
utf8mb3 is not supported.
2. If the current project is connected to a utf8mb3 MySQL database or other types of databases:
utf8mb4 is recommended for the new configuration database.
Both utf8mb4 and utf8mb3 are supported.
For MySQL 5.x with utf8mb4, ensure the database version is 5.5.3 or later and innodb_large_prefix = ON is set.
This is required because utf8mb4 uses 4 bytes per character, which may cause index length limits to be exceeded. Enabling innodb_large_prefix allows longer index prefixes. Failure to enable this parameter may cause table index creation failures and project errors.
Refer to the MySQL official documentation for configuration instructions.
3. Collation
Ensure the collation is case-sensitive.
For the utf8mb4 character set: Only utf8mb4_bin is supported. utf8mb4_general_ci is not supported.
For the utf8mb3 character set: Only utf8mb3_bin is supported. utf8mb3_general_ci is not supported.
Prepare the following tablespace information for connection:
Name of the tablespace created in the "Creating a Tablespace" section
You are advised to use an all-English tablespace name. The tablespace name supports only letters, numbers, underscores (_), and dots (.).
IP address of the database server
The host name supports only letters, numbers, underscores (_), hyphens (-), and dots (.).
Database username
The user must have CREATE, DELETE, ALTER, UPDATE, SELECT, INSERT, and INDEX privileges to support configuration table structure modifications and configuration updates.
Database user password
Do not arbitrarily modify the username or password after a successful connection, or the project will fail to start.
Choose the appropriate connection method based on the actual conditions.
In the Project Setting step during new project deployment, you can connect to a self-prepared MySQL database as the configuration database.
You must ensure the database tablespace is empty with no existing data. Otherwise, the connection will fail.
1. Select Connect to Existing External Database in External Configuration Database.
2. Fill in the external configuration database information:
Database Type: Select mysql.
Driver: No change is required. Keep com.mysql.jdbc.Driver.
Database Name, Host, Port, Username, and Password: Enter the information prepared in the "Preparing the Configuration Database" section.
3. Click Test Connection. The message "Connected successfully" indicates a normal connection.
You can configure a self-prepared MySQL database as the configuration database in FineOps's Cluster Management.
Verifying the FineOps Version
This document provides instructions based on FineOps of the latest version. Ensure FineOps is of V2.31.0 or later versions.
For projects requiring no configuration data migration, FineOps of V2.30.0 and earlier versions cannot restart projects automatically.
For multi-application projects, FineOps of V2.29.0 and earlier versions require ensuring only one application node is active during configuration service connection or migration.
For details, see Extranet-Based FineOps Upgrade and Intranet-Based FineOps Upgrade.
Configuring the External Configuration Database
1. Log in to FineOps as the admin. Select the target project, choose Maintenance > Cluster Management, and configure External Configuration Database.
2. Enter the required information:
Database Connection URL: It is generated from other configuration and preset parameters. Generally, no change is required.
3. Choose whether to tick Migrate Data to Database to Be Enabled:
1. Migrate Data to Database to Be Enabled must be ticked.
2. After a successful connection, the existing configuration data of the project will be migrated to the tablespace.
3. Any existing data in the new MySQL tablespace will be cleared and cannot be recovered.
1. Upload the prepared configuration data to the new MySQL tablespace.
Ensure the JAR package version of the source project exactly matches the JAR package version of the current project.
2. Do not tick Migrate Data to Database to Be Enabled.
3. After a successful connection, the project will use the data in the tablespace as its configuration.
4. Original connection information will be backed up to the db.properties.bak file in the config directory of the project.
5. Historical configuration cache exists in the project. Restart the project after a successful configuration database switchover to clear the cached configuration.
4. Click Enable Database.
Restarting the Project (with Migrate Data to Database to Be Enabled Unticked)
If Migrate Data to Database to Be Enabled is unticked, the historical configuration cache will remain in the project after the configuration database switchover. You must restart the project to clear the cache.
FineOps-deployed projects: FineOps automatically restarts the project after a successful configuration database switchover.
Projects not deployed via FineOps: Manually restart the project after the switchover. For details, see Closing or Restarting the FineBI Project.
You can configure a self-prepared database as the configuration database under System Management > Systen Setting > General of the FanRuan application.
Ensuring a Single Active Application (Required for Multi-application Projects)
For multi-application projects, ensure only one application node is active during configuration service connection or migration.
Log in to FineOps as the admin. Select the target project and choose Maintenance > Component Management. Check if multiple bi-web/fr/fdl containers are active.
If multiple containers exist, click the icon of each container to stop other containers, leaving only one in active status.
1. Log in to the FanRuan application as the admin. Choose System Management > System Setting > General. Locate External Database and configure it.
Database Connection URL: It is generated from other configuration and preset parameters. Suffix it with &useSSL=false&serverTimezone=Time zone&zeroDateTimeBehavior=CONVERT_TO_NULL.
4. Click Enable New Database. The message "Migrated successfully" indicates a normal connection.
Ensuring Multi-application Configuration Synchronization (Required for Multi-application Projects)
1. Copy the db.properties file.
Navigate to the server hosting the single active bi-web/fr/fdl container and copy the db.properties file in the component mounting path /config.
Paste the file to the same location on all other bi-web/fr/fdl container servers.
For projects not deployed via FineOps, copy db.properties from /webroot/WEB-INF/embed in the single active application directory to the same location in all other application directories.
2. Stop all applications.
Log in to FineOps as the admin and choose Maintenance > Component Management.
Click Stop on all FineBI - Application Node/FineReport/FineDataLink components. Ensure all bi-web/fr/fdl containers are in the exited status.
3. Restart all applications.
Click Start on all FineBI - Application Node/FineReport/FineDataLink components under Maintenance > Component Management. Ensure all bi-web/fr/fdl containers are in the running status.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy