首页 > 数据库技术 > 详细

MySql Replication

时间:2016-01-28 18:55:12      阅读:178      评论:0      收藏:0      [点我收藏+]

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.

  在 /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

MySql Replication

原文:http://www.cnblogs.com/tekkaman/p/5167007.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!