MySQL: Create Master

http://www.unixmen.com/setup-mariadb-master-slave-replication-in-centos-7/

and

http://www.rackspace.com/knowledge_center/article/set-up-mysql-master-slave-replication

Note:

1. Be careful of the binlog directory's permission.

2. Don't add it in the my.conf ->

master-host =  [private-IP-of-db01]
master-user = [replication-username]
master-password = [replication-password]
master-connect-retry = 60

原文地址:https://www.cnblogs.com/ilovewindy/p/4885026.html