where is sulphate going here? electrolysis of magnesium sulphate
In electrolysis of aqueous solutions sulfate ions just sit there.  Protic hydrogen (or the metal in the cation if this metal is not highly electropositive like magnesium) is reduced more easily at the cathode, and water is more easily oxidized at the anode.

Sulfate ion (actually, bisulfate ion) can be oxidized electrolytically at the anode if you use sulfuric acid instead of water as the solvent.  See the preparation methods for potassium peroxydisulfate.