How would I sync tables in two separate servers in mysql?
What you likely want to use is called Replication, which is a methodology for keeping two databases across two servers in sync with each other. Please see the MariaDB documentation here on how to set it up: Setting Up Replication
Also I think you'll probably want to understand the different Binary Log Formats before you set it up as well.