make sure we init mysql in a threadsafe manner