【mysql mariadb 主从复制 】‘FOR CHANNEL ‘master-203” at line 1

我正在尝试设置多源复制 尝试使用此查询为特定通道设置主控时 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'; 我收到以下错误 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 我无法弄清楚问题是什么.该查询几乎是一个复制粘贴from the official documentation 我的服务器正在运行MariaDB 10.1.21 可能有什么不对?

您正在查看MySQL 5.7的文档,但是您正在运行MariaDB 10.1,并且复制通道恰好是MariaDB中以不同方式实现的功能. 从multi-source replication上的MariaDB文档: You specify which master connection you want to work with by either specifying the connection name in the command or setting default_master_connection to the connection you want to work with. 所以在你的情况下,你可以尝试: CHANGE MASTER 'master-203' 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; (免责声明:我在实践中没有尝试过这个.)

转载请注明出处:

转载自https://lxfamn.cn/blog

未经允许不得转载:lxfamn » 【mysql mariadb 主从复制 】‘FOR CHANNEL ‘master-203” at line 1

赞 (0) 打赏

置顶推荐

评论 0

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏