title: Sync MySQL Databases via SSH using Java
body: <p>I have a MySQL database installed in my Amazon AWS instance (not RDS). The same database is installed in a personal computer, offline. </p>
  
  <p>You have to connect to the amazon database via SSH, it is in a Ubuntu instance.</p>
  
  <p>The online database contains information of 1000 users. The offline versions contain information only for that particular user.</p>
  
  <p>Users use a Java desktop application to feed  data into the local database. When they click on the <code>Sync</code> button, the 2 databases should be synced. Remember here that the desktop offline database should "upload" the newly inserted things to the online database while it should "download" new data (if any) related only to the particular user .</p>
  
  <p>The system cannot be a manual way where someone manually turn on a 3rd party application, use putty or connect SSH, configure the databases etc and sync. The system should be embedded to the desktop java application. </p>
  
  <p>I looked into things like <code>SymmetricDS</code> and it is too much complicated, not sure about the SSH access too.</p>
  
  <p>Any idea about how to do this in an easy way? I am also creating a REST API thinking I can handle this manually, but if there is already built system/API I am onto it.</p>