You forgot to etch the bare magnesium first before the primer paint
Used to use Magna-Dyne for this purpose, but it's been phased out of production for being too toxic.
Best substitute that I found was Pre-Kote.
Pictures and step-by-step description of all of this magnesium wheel refinishing jazz, which as a coincidence is a current winter work-in-progress on my Daytonas, have just been posted on the X portion of my website.
Cheers - DM