Code in this video: How to Configure MariaDB Replication Master-Slave on Ubuntu

Code in this video: How to Configure MariaDB Replication Master-Slave on Ubuntu

📌 Note: Replace the orange-highlighted information with your own details.

✳️ on Master Server

bind-address = IP-Master-Server
server-id=101
report_host=Hostname-Master-Server
#
log_bin=/var/log/mysql/mariadb-bin
log_bin_index=/var/log/mysql/mariadb-bin.index
#
relay_log=/var/log/mysql/relay-bin
relay_log_index=/var/log/mysql/relay-bin.index

create user rep_user@IP-of-Slave identified by 'rep_user_PWD';

grant replication slave on *.* to rep_user@IP-of-Slave;

✳️ on Slave Server

bind-address = IP-Slave-Server
server-id=102
report_host=Hostname-Slave-Server
#
log_bin=/var/log/mysql/mariadb-bin
log_bin_index=/var/log/mysql/mariadb-bin.index
expire-logs-days=10
read_only=1

change master to
master_host='IP-of-Master',
master_user='Database-User',
master_password='Database-Password',
master_log_file='Log-file-on-Master',
master_log_pos=Position-on-Master;

Leave a Reply

Your email address will not be published. Required fields are marked *