MySQL replication master-slave
VMs are fine for testing, performance overhead exists but it is at most 30% under high load, not orders of magnitude.

If you want to run multiple database instances on the same machine, what you are looking for is mysqld_multi. You should probably avoid it, though, it is a terrible, messy solution. VMs are a better approach. Or containers if you really feel you have to avoid VMs at all cost.