When mysql server is restart, Wait for mysql server is connected