MariaDB Replikation (Ubuntu)

Aus Tutorials
Zur Navigation springen Zur Suche springen

Noch in Bearbeitung


Server A

Die Datei /etc/mysql/mariadb.conf.d/50-server.cnf editieren

sudo vi /etc/mysql/mariadb.conf.d/50-server.cnf

und folgende Zeilen hinzufügen/anpassen:

log-bin /var/log/mysql/mysql-bin.log
server_id=1
replicate-do-db=replicate
bind-address=10.0.0.157

Danach den Server neu starten:

sudo systemctl restart mariadb


CREATE USER 'master'@'%' IDENTIFIED BY '<password>';
GRANT REPLICATION SLAVE ON *.* TO 'master'@'%';
FLUSH PRIVILEGES;
SHOW MASTER STATUS;

Server B

Links

https://www.vpsserver.com/community/tutorials/9/setup-a-master-to-master-replication-between-two-mariadb-servers/


Zurück zu MariaDB