my question is that in this scenario what would the result be? i heard that MgCl under electrolysis will produce mg(s) + cl(g) which is what i am after. i am hoping that mg(s) would then react with the water to produce hydrogen(g) and Mg(oh)2 which would react with the HCl to form MgCl + 2(H20)
does this make sense or am i missing something?