1. translate mysql error to readable error message; 2. fix some samll errors.