Started mysql code for mpos compat.