encoding: move MySQL error report code to mrn::encoding