MgCl2
Mg = magnesium
Cl = chlorine
Magnesium + chlorine = magnesium chloride.
This is because compounds are always written with the METAL FIRST and the NON METAL SECOND. the non metal ends in - ide when it reacts with a metal.
So ur answer would be magnesium chloride. :)