I find myself in need of setting up a master-slave replication between a MySQL server with 4000+ DBs and it's first slave.
The database is currently handling production workload and starting up replication must be done without incurring downtime.
Is there any tool or battle-tested procedure to do that? (dump all the data with minimal locking and saving the masters binlog position with complete accuracy?)
What i've been pondering so far is dump-ing the databases one by one while saving the binlog position, loading the data into the slave then starting the slave with replicate-do-db with all databases loaded so far, stopping replication once slave has caught up, rinse and repeat... But I'm not 100% sure this is the best way to do it.
Thank you, Rares
Later edit: Tables are mostly MyISAM but there are a few InnoDB.