I have a small mysql database (200 MB) running on a server. The application using it writes around 100 times/minute and reads a bit less.
I need to move that database to a new server with ideally no downtime or as little as possible. None of the data being written to it can be lost.
Doing a mysqldump then restoring it would take too long i guess, what is the right way to do it?
Most of the tables are using Innodb.
You can set up replication. Make your new server a slave to the current server. Then switch the master/slave connection (there’s enough on the internet about how to do this exactly, but in the end you had 2 servers with almost the same content, one just a tiny bit ahead of the other, and you switch their roles).
Once you’ve switched them, you can turn off the slave (the old master) and you’re fixed.