title: Mysql Synchronization for multiple servers
body: <p>I'm at a loss for what to do for my use-case aside from just build my own, but perhaps someone here knows of a program to do it?</p>
  
  <p>Here goes,</p>
  
  <p>I have multiple users (like 15), each has a tablet that they do work on, that work gets stored into a mysql database on the tablet. The work also requires data from all other databases. There is also a main database that many users connect to to get information off of and write to. This data must also be distributed to the tablets.</p>
  
  <p>This is all because the tablets are often offline, and must work offline, and sync back when they get service.</p>
  
  <p>There is no need to compare data or anything. Data is just a row in a table, it basically just needs to be stored as a new row, duplicates do not matter even. </p>
  
  <p>flow of data</p>
  
  <ul>
  <li>user enters data on tablet</li>
  <li>data gets stored in local DB</li>
  <li>if there is a connection, data copies to main DB</li>
  <li>main DB distributes data to other tablets</li>
  <li>if other tablets, some do not have link, it will send them when it
  does have a link</li>
  </ul>
  
  <p>More flow</p>
  
  <ul>
  <li>computer user enters data to main DB</li>
  <li>Main DB distributes the data to all tablets</li>
  </ul>
  
  <p>All of the main DB to tablet connections are handled with SSH tunnels. the Main DB has connection to all tablets whenever they are in signal. 
  The tablets do not have a connection to each other.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Just found this here, I knew of replication, but did not know it can now do multi-master. 
  <a href="https://www.percona.com/blog/2013/10/02/mysql-5-7-multi-source-replication/" rel="nofollow noreferrer">https://www.percona.com/blog/2013/10/02/mysql-5-7-multi-source-replication/</a></p>
  
  <p>But it sounds like it will start a process of defecation as soon as the tablets lose cell signal or are turned off.
  I'll test it next week though. </p>