Skip to content
Snippets Groups Projects
Commit 2f07a2f1 authored by jurgenhaas's avatar jurgenhaas
Browse files

Documentation for replication setup

parent e459aee9
No related branches found
No related tags found
No related merge requests found
......@@ -33,3 +33,18 @@ drupal_settings:
- cache*
- access*
```
# Replcation
- [Replication Configuration](https://dev.mysql.com/doc/refman/5.7/en/replication.html)
- [Replication SQL Statements](https://dev.mysql.com/doc/refman/5.7/en/sql-replication-statements.html)
## Setting up a new replication
Starting from [here](https://dev.mysql.com/doc/refman/5.7/en/replication-howto-masterstatus.html) there are basically these steps:
- Create a DB dump: lock tables, remember bin log position, dump db (see [Choosing a Method for Data Snapshots](https://dev.mysql.com/doc/refman/5.7/en/replication-snapshot-method.html)) and copy to secondary host
- Unlock the tables again
- Configure secondary for new master with Ansible playbook `dans COMPANY mysqlsecondary --tags=changemaster --extra-vars="port=[PORT]" --extra-vars="binpos=[BINLOGPOS]"`
- On the secondary, start the MySQL server and turn off replication (`stop slave`)
- Import dump file and then start replication again (`start slave`)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment