Revision History: Setting up Master/Slave Replication from an existing MySQL server
This is revision 469 of the page Setting up Master/Slave Replication from an existing MySQL server, as it appeared on Wed, 16 Apr 2014 20:13:14 -0700.
MySQLCurrently https://cryptfolio.com is running off a single MySQL server. I want to switch this to a master/slave setup, which I intend will:
- increase performance (0.10% of queries are blocked by updates), but not too much since the database is very write-heavy (59% of queries)
- increase visible performance greatly (often graphs are blocked by pending writes especially to summary_instances and balances tables)
- improve reliability (if the slave goes down, I can point web servers to master; if the master goes down, I can enable read-only site mode)
- cost more money to run (since I'll be running two nodes rather than one) but still much cheaper (and more interesting) than going through S3
- databases suitable for memcachedb/keystores are not yet used that heavily
1. Setup master
16.1.1.1 Setting the Replication Master Configuration- Edit my.cnf and set:
[mysqld] log-bin=mysql-bin # enable binary logging server-id=1 # this ID cannot be used by any other server# Restart server
Categories: MySQL