moving mysql proxy logic to BE