Home  >  Article  >  Database  >  Mysql 主从同步简单配置_MySQL

Mysql 主从同步简单配置_MySQL

WBOY
WBOYOriginal
2016-06-01 13:11:351065browse

//master

log-bin=mysql-bin
server-id=222

//创建同步帐号
GRANT REPLICATION SLAVE ON *.* to 'mysync'@'172.168.16.105' identified by 'test'


//slave

server-id=221

change master to master_host='192.168.130.198',master_user='sync',master_password='yLGxdSTwmY',master_log_file='mysql-bin.000022',master_log_pos=107;
start slave


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn