added mysql connection retries