Step 3: Start and Configure MariaDB Enterprise Server on Replica Servers
Overview
This page details step 3 of the 7-step procedure "Deploy Primary/Replica Topology".
This page starts and configures a MariaDB Enterprise Server 11.4 to operate as a replica server in MariaDB Replication.
Interactive commands are detailed. Alternatively, the described operations can be performed using automation.
Stop the Enterprise Server Service
The installation process might have started the Enterprise Server service. The service should be stopped prior to making configuration changes.
On each Enterprise Server node, stop the MariaDB Enterprise Server service:
$ sudo systemctl stop mariadbConfigure Enterprise Server
Enterprise Server nodes require that you set the following system variables and options:
The network socket Enterprise Server listens on for incoming TCP/IP client connections. On Debian or Ubuntu, this system variable must be set to override the 127.0.0.1 default configuration.
Enables binary logging and sets the name of the binlog file.
Unique numeric identifier for each Enterprise Server node.
MariaDB Enterprise Server also supports group commit.
Parallel Replication
Writes to the primary server that are group committed or logged with a Global Transaction ID in different replication domains can be applied on the replica server using parallel threads to improve performance.
Sets the number of threads the replica server uses to apply replication events in parallel. Use a non-zero value to enable Parallel Replication.
Sets how the replica server applies replicated transactions.
Example Configuration
On each Enterprise Server node, edit a configuration file and set these system variables and options:
Set the server_id option to a value that is unique for each Enterprise Server node.
Initialize Replica Database
When deploying a new replica server to an existing system, back up the primary server and restore it on the replica server to initialize the database.
Back up the Primary Server
Use MariaDB Backup to back up the primary server.
On the primary server, take a full backup:
Confirm successful completion of the backup operation.
On the primary server, prepare the backup:
Confirm successful completion of the prepare operation.
Restore the Backup to the Replica Server
On the primary server, copy the backup directory to each replica server:
On the replica server, move the default datadir to another location:
On the replica server, use MariaDB Backup to restore the backup to the datadir:
On the replica server, set the file permissions for the datadir:
Start Replica Server
Start MariaDB Enterprise Server. If the Enterprise Server process is already running, restart it to apply the changes from the configuration file.
For additional information, see "Starting and Stopping MariaDB".
Set the Global Transaction ID Position
If the replica server was restored from a backup of the primary, set the GTID position.
Get the GTID position that corresponds to the restored backup. This can be found in the xtrabackup_binlong_info file.
The GTID position from the above output is 0-1-2001,1-2-5139.
Connect to the replica server:
Set the gtid_slave_pos system variable to the GTID position:
Start Replication
Execute the CHANGE MASTER TO statement to configure the replica server to connect to the primary server at this position:
The above statement configures the replica server to connect to a primary server located at 192.0.2.10 using the repl user account. This account must first be configured on the primary server.
Use the START REPLICA statement to start replication:
Use SHOW REPLICA STATUS statement to confirm replication is running:
Next Step
Navigation in the procedure "Deploy Primary/Replica Topology":
This page was step 3 of 7.
Next: Step 4: Test MariaDB Enterprise Server
This page is: Copyright © 2025 MariaDB. All rights reserved.
Last updated
Was this helpful?

