...
Install the same MariaDB server package that Abiquo API server is using on the replica server. To do this, install your current
On the replica server, Install your
abiquo-release package
...
Install MariaDB with this command
Code Block yum -y install MariaDB-server MariaDB-client
...
Configure DB replication on the main DB server
On the main DB server, create the replication configuration file
...
Code Block cat <<EOF >/etc/my.cnf.d/replication.cnf [server] log-basename=master log-bin binlog-format=row server_id=1 EOF
Restart the mysql service
...
Code Block service mysql restart
Create a replicator user and grant it replication permissions by executing the query below on DB prompt. Replace
REPLICA_USER
,REPLICA_PASS,
andREPLICA_SERVER
with values for your environment
...
.
Code Block grant replication slave on *.* to 'REPLICA_USER'@'SLAVE_SERVER' identified by 'REPLICA_PASS'; flush privileges;
...
Configure DB replication on
...
replica DB server
Create the replication configuration file in Maria DB
...
replica server
...
.
Code Block cat <<EOF >/etc/my.cnf.d/replication.cnf [server] server_id=2 EOF
Restart the
mysql
service
...
.
Code Block service mysql restart
Warning |
---|
To use multiple replica servers, in |
...
Perform initial replication
To perform the initial replication, get the current status of the main dbDB, including the file and the current position in the log, and then perform a dump of the database with the following steps
...