I'm trying to set up a multi-source replication
When trying to set a master for a specific channel using this query
CHANGE MASTER TO MASTER_HOST='192.168.0.203', MASTER_USER='rep', MASTER_PORT=3306, MASTER_PASSWORD='pass', MASTER_LOG_FILE='mysql-bin.000003', MASTER_LOG_POS=107 FOR CHANNEL 'master-203';
I get the following error
Error Code: 1064. You have an error in your SQL syntax; check the
manual that corresponds to your MariaDB server version for the right
syntax to use near 'FOR CHANNEL 'master-203'' at line 1
I can't figure out what's the problem. The query is pretty much a copy-paste from the official documentation
My server is running MariaDB 10.1.21
What could be wrong?
Best Answer
You're looking at the documentation for MySQL 5.7, but you're running MariaDB 10.1, and replication channels happen to be a feature that is implemented differently in MariaDB.
From the MariaDB documentation on multi-source replication:
So in your case you could try:
(Disclaimer: I've not tried this in practice.)