The Mighty Guard spell is one of the few spells in FFXIV that you cannot learn from defeating an enemy as the Blue Mage. Instead you must learn it as part of your Blue Mage quest line. The Mighty Guard spell is really nice since it allows you to be very tanky, seeing as it reduces the damage you take. This is very useful in certain situations, but it also reduces the damage you deal, so you might not want to use to when you play solo.
In order to learn Mighty Guard, you will need to have learned at least 10 other spells by defeating enemies. This is done by defeating any enemy that uses a spell, and every time you kill it you have a small chance to learn that spell. Once you have learned 10 different spells, go back to Steps of Thal in Ul’Dah and find Wayward Gaheel Ja. This NPC islocated near Martyn, the guy who typically give you most of your Blue Mage job quests.
Just interact with Wayward Gaheel Ja and complete the quest, and he will teach you to use the Mighty Guard spell permanently.