Giter VIP home page Giter VIP logo

replication-test's Introduction

MySQL Replication Test

To start you have to up docker containers:

docker-compose up -d

mysql-master container

  1. docker exec -it mysql-master bash

  2. mysql -uroot -ptest test

  3. GRANT REPLICATION SLAVE ON . TO 'slave'@'%' IDENTIFIED BY 'test'; slave user

  4. SHOW MASTER STATUS; SHOW MASTER STATUS

mysql-slave1, mysql-slave2 containers

  1. docker exec -it mysql-slave1 bash

  2. mysql -uroot -ptest test

  3. CHANGE MASTER TO MASTER_HOST='mysql-master', MASTER_USER='slave', MASTER_PASSWORD='test', MASTER_LOG_FILE = 'mysql-bin.000001', MASTER_LOG_POS = 1321;

  4. START SLAVE;

  5. SHOW SLAVE STATUS\G SHOW STATUS

Result

After creation table and some inserts I insert data to mysql-slave2 server and broke synchronization.

mysql-master server MASTER TASKS

mysql-slave2 server SLAVE2 TASKS

All required queries in master.sql and slave.sql files.

replication-test's People

Contributors

anton-zamniborshch avatar chepheus avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.