mysql中changemasterto
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了mysql中changemasterto,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1532字,纯文字阅读大概需要3分钟。
内容图文
![mysql中changemasterto](/upload/InfoBanner/zyjiaocheng/556/9951ff95ecf941c58770185606928a54.jpg)
在从机器上做好了相应的恢复后,我们要指定从机器所对应的master信息,从而让slave开始工作 手册中解释如下: CHANGE MASTER TO changes the parameters that the slave server uses for?connecting to and communicating with the master server. It also u
在从机器上做好了相应的恢复后,我们要指定从机器所对应的master信息,从而让slave开始工作
手册中解释如下:
CHANGE MASTER TO changes the parameters that the slave server uses for?connecting to and communicating with the master server. It also updates?the contents of the master.info and relay-log.info files.
这个命令连接master服务器,同时更新master.info和relay-log.info
*Note*: Replication cannot use Unix socket files. You must be able to?connect to the master MySQL server using TCP/IP.
这里说明复制不能使用socket来连接,必须是使用tcp/ip
MASTER_LOG_FILE and MASTER_LOG_POS are the coordinates at which the?slave I/O thread should begin reading from the master the next time the?thread starts. If you specify either of them, you cannot specify?RELAY_LOG_FILE or RELAY_LOG_POS.
这两个参数用来指定slave从那个坐标开始读取数据,如果这两个参数有设定的话就不能在指定RELAY_LOG_FILE或RELAY_LOG_POS
案例如下:
CHANGE MASTER TO
MASTER_HOST=’master2.liufofu.com’,
MASTER_USER=’replication’,
MASTER_PASSWORD=’liufofu’,
MASTER_PORT=3306,
MASTER_LOG_FILE=’master2-bin.001′,
MASTER_LOG_POS=4,
MASTER_CONNECT_RETRY=10;
本文出自:http://www.liufofu.com, 原文地址:http://www.liufofu.com/2014051110.html, 感谢原作者分享。
内容总结
以上是互联网集市为您收集整理的mysql中changemasterto全部内容,希望文章能够帮你解决mysql中changemasterto所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。