I have a 300 GB mysql database which i want to migrate to another server in order to setup Master-Master replication between the two and my main aim is to achieve this with least possible downtime.
My database has only one table around 30GB where inserts are happening round the clock. All the other tables are history tables(static).
1) What will be the best way to go forward in this case?
Taking mysqldump of the whole database and transferring the dump to other server and importing it to the new server will do the job i want to achieve but will take a lot of downtime (maybe more than 14hrs) which is not permissible.
Or can i take individual table dumps for the static tables without stopping mysql and import it to new server ,and after all this is over, take downtime for the single active table so that no new inserts will happen and both my databases will be in sync? First of all is it possible to do such a thing ? and if possible what issues it might present while setting up a master-master replication?
- Or is there any other method to do this with very less downtime?