I have been developing and running a mysql-based web application (intranet-based) for some time now. I wish to establish a step-by-step sane sequence for creating a slave from the running MySQL master. I have decided I should start the slave server by copying MySQL raw data files. A couple dozen times, I've gone through the relevant section of the manual, and I'm still dizzy.
I once got replication going (years ago) using this same approach, but at present, I'm in a bit of a fix. I think the complexity for me has been increased by the following:
- I am using version
- I have just turned on GTID mode, when I never really mastered the "old" system yet!
- Generally, most tutorials and help posts out there are currently either outdated or in "transition", given the recent changes and advances in replication functionality that came on board during the
Currently, I have the following config declarations:
log-bin=mysql-bin server-id=1 innodb_flush_log_at_trx_commit=1 sync_binlog=1 binlog-format=MIXED enforce-gtid-consistency gtid-mode=ON log-slave-updates
log-bin=mysql-bin server-id=2 read-only=ON gtid-mode=ON enforce-gtid-consistency binlog_format=MIXED
- In order to copy raw data files from the master, what should be my step-by-step process?
- Exactly what files within the data directory must I NOT copy, and why?
- On the slave, what are the gotchas, especially regarding the GTID mode?
I'm sorry if aspects of my question sound vague. I'd be more than willing to elucidate as might be necessary.
Thank you in advance.