-1
MariaDB [(none)]> CHANGE MASTER TO MASTER_HOST='192.168.56.116', MASTER_PORT=3306, MASTER_USER='replica1', MASTER_PASSWORD='pass@123', MASTER_LOG_FILE='mysql-bin.000002', MASTER_LOG_POS=327 FOR CHANNEL 'master1_test116';

ERROR 1064 (42000): 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 'master1_test116'' at line 1 MariaDB [(none)]>

Two mariadb masters having 10.1.48 and 1 slave 10.4.25

Barmar
  • 741,623
  • 53
  • 500
  • 612
Manish
  • 1

1 Answers1

1

From the documentation:

MariaDB starting with 10.7.0
The FOR CHANNEL keyword was added for MySQL compatibility. This is identical to using the channel_name directly after CHANGE MASTER.

So you should write

CHANGE MASTER 'master1_test116' TO MASTER_HOST='192.168.56.116', MASTER_PORT=3306, MASTER_USER='replica1', MASTER_PASSWORD='pass@123', MASTER_LOG_FILE='mysql-bin.000002', MASTER_LOG_POS=327;
Barmar
  • 741,623
  • 53
  • 500
  • 612
  • Dear Barmar, Can I add more or 2 database in master_1 if one is already there? – Manish Jun 23 '22 at 09:43
  • You can replicate as many databases as you want. – Barmar Jun 23 '22 at 15:35
  • Dear Barmar Sir, I have added two databases in conf file like binlog_db_db=Test116 binlog_db_db=Test117. Now I want to ignore some tables as not required in the slave server for the security propouse. how i can ignore? – Manish Jun 24 '22 at 05:44
  • I'm not really an expert on configuring master/slave. You should ask a new question in [dba.se]. – Barmar Jun 24 '22 at 14:00