main() will now wait for init MySQL operations correctly.