[mysql] refactor a db_util  for database utility logic.