MySql Replication in two directions
This is called as MySQL Master-Master replication.
You can follow these links which can be helpful to you:

1. How to setup Master-Master replication

2. How to setup Master-Master replication

Another way to implement multi-master replication, including circular replication is using MySQL Cluster.

3. MySQL Cluster replication - Multi Master