Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Install the same MariaDB server package that Abiquo API server is using on the replica server. To do this, install your current

  1. On the replica server, Install your abiquo-release package

...

  1. Install MariaDB with this command

    Code Block
    yum -y install MariaDB-server MariaDB-client

...

Configure DB replication on the main DB server

  1. On the main DB server, create the replication configuration file

...

  1. Code Block
    cat <<EOF >/etc/my.cnf.d/replication.cnf
    [server]
    log-basename=master
    log-bin
    binlog-format=row
    server_id=1
    EOF

  2. Restart the mysql service

...

  1. Code Block
    service mysql restart

  2. Create a replicator user and grant it replication permissions by executing the query below on DB prompt. Replace REPLICA_USER, REPLICA_PASS, and REPLICA_SERVER with values for your environment

...

  1. .

    Code Block
    grant replication slave on *.* to 'REPLICA_USER'@'SLAVE_SERVER' identified by 'REPLICA_PASS';
    flush privileges;

...

Configure DB replication on

...

replica DB server

  1. Create the replication configuration file in Maria DB

...

  1. replica server

...

  1. .

    Code Block
    cat <<EOF >/etc/my.cnf.d/replication.cnf
    [server]
    server_id=2
    EOF
  2. Restart the mysql service

...

  1. .

    Code Block
    service mysql restart
Warning

To use multiple replica servers, in /etc/my.cnf.d/replication.cnf for each replica server, you must define a different server_id, and it must be greater than the server_id of the main server.

...

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

...