I have 2 MySQL databases with same table structure but on different servers. I want to make it that when the database on server 1 is updated, the database on the server 2 is also updated, and vice versa. Can I do it in MySQL?
What you are looking for is two-way replication. You can read up on why not to do it with mysql here If you must, mysql supports it, but it doesn't guarantee atomicity of the operations involved, which will lead to inconsistencies at some point. I stronly advise against this.