0

I had setup a 3 node Galera cluster in production network. And I am replicating the data from a Standalone MySQL Server to one of the galera node(node1) through master slave replication.

I can replicate data within the cluster. But the problem is the data replicated from the Standalone server to the node1 is not replicating across the node2 and node3. I can see the exact async replica of MySQL standalone server in node1.

Thanks in advance.

 -----(Master)        -----
 MySQL --- >          Node1(Slave)
 -----                -----
                   /         \
                  |           |
                -----        -----
                Node2        Node3
                -----        -----
1

The question comment guess by jerichorivera was absolutely right:

log-slaves-updates on node1 enabled?

..but you seem to have misunderstood.

log_bin=/var/log/mysql/mysql-bin

(or whatever file basename) to enable writing the binary logs a slave can read from. However, this alone lets the node write empty binary logs (a size of a few hundred bytes) if it is slave on its own. To act as intermediate master, also set

log_slave_updates

in the my.cnf.

  • Thanks. It's working fine. But the master to slave (node1) is very slow to update and cluster nodes updating very fast. For a single day stand alone MySQL server produces 20GB of bin file in a 1Gbps network. – Rameez Apr 25 '16 at 7:56
0

I suggest you to check the table engines, Because the Galera cluster support InnoDB engine not MyISAM.

So here is a easy way how to migrate Mysql database with MyISAM tables into Galera and InnoDB:

  1. Make sure your db schema doesn't contain FULLTEXT indexes or any other constructions, which are not supported by InnoDB engine

2.Dump schema of your database

3.replace in the dump string "MYISAM" with "INNODB"

4.Dump data

5.Prepare db user in Galera Cluster (mysql.user table is not replicated across cluster, so you have to insert db user into each of your mariadb servers)

6.Import schema (with innodb engine)

7.Import data

8.Cleanup dump files

Thanks from https://support.qualityunit.com/718375-Migrate-MySQL-Database-with-Myisam-engine-to-MariaDB-Galera-Cluster

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.