mysql中change master to

WBOY
풀어 주다: 2016-06-07 16:41:53
원래의
2410명이 탐색했습니다.

在从机器上做好了相应的恢复后,我们要指定从机器所对应的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;

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!