Nick Barmby scored his second goal of pre-season in the 27th minute, but the lead lasted just 2 minutes as Adam Griffin equalised for the League Two club.
Ian Ashbee put City back in front 5 minutes into the second half with a goal from 25 yards.
Stockport debutant Matty McNeil headed the equaliser in stoppage time to make it 2-2.