您的位置:首页 > 数据库 > MySQL

MySql Replication

2016-01-28 17:32 417 查看
MySql Replication

  Replication is asynchronous by default. Depending on the configuration, you can replicate all databases, selected databases, or even selected tables within a database.

  To configure a master to use binary log file position based replication, you must enable binary logging and establish a unique server ID. If this has not already been done, a server restart is required.

  Note

  Ensure that the
skip-networking
option is not enabled on your replication master. If networking has been disabled, the slave can not communicate with the master and replication fails.

  在 /usr/local/mysql/my.cnf 中添加 log-bin 和 server-id 属性。

  if you omit
server-id
(or set it explicitly to its default value of 0), the master refuses any connections from slaves.

  在Slave中更新Master信息。

  


  开启Slave

  


  创建 Replication 用户:

  


  


  

参考:http://dev.mysql.com/doc/refman/5.7/en/replication-howto-masterbaseconfig.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: