Made mysql access dependent on there being real work to do