mysql – 更改master for channel会出现语法错误

weixin_38058086 2019-09-12 10:41:01
我正在尝试设置多源复制 尝试使用此查询为特定通道设置主控时 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 可能有什么不对?
...全文
456 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_38076382 2019-09-12
  • 打赏
  • 举报
回复
您正在查看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; (免责声明:我在实践中没有尝试过这个.)

433

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧