Skip to navigation
How to setup a master to master replication on mysql server 5.5
27.07.15
Server A: 1. edit file /etc/mysql/my.cnf server-id = 1 log_bin = /var/log/mysql/mysql-bin.log expire_logs_days = 10 max_binlog_size = 500M binlog_do_db = shopsql1 binlog_ignore_db = shopsql2 2 create replicator user in mysql client>> create user 'replicator'@'%' identified by 'PASS'; grant replication slave on *.* to 'replicator'@'%'; 3. run in mysql client SHOW MASTER STATUS; and notice File and Position Server B: same 3 steps but change server-id = 1 to server-id = 2 Now you need to enter the starting mnaster_host config on both server Server A: slave stop; CHANGE MASTER TO MASTER_HOST = 'IP of server B', MASTER_USER = 'replicator', MASTER_PASSWORD = 'PASS', MASTER_LOG_FILE = ' file of server B', MASTER_LOG_POS = position_of_server_b; slave start; Server B: slave stop; CHANGE MASTER TO MASTER_HOST = 'IP of server A', MASTER_USER = 'replicator', MASTER_PASSWORD = 'PASS', MASTER_LOG_FILE = ' file of server A', MASTER_LOG_POS = position_of_server_a; slave start;
https://www.howtoforge.com/mysql_database_replication_p2
Reply
Anonymous
Information Epoch 1732581914
When in doubt, use brute force.
Home
Notebook
Contact us