Wikipedia defines mandamus as:
Mandamus is a judicial remedy in the form of an order from a court to any government, subordinate court, corporation, or public authority, to do (or forbear from doing) some specific act which that body is obliged under law to do (or refrain from doing), and which is in the nature of public duty, and in certain cases one of a statutory duty
and defines injunction as:
An injunction is a legal and equitable remedy in the form of a special court order that compels a party to do or refrain from specific acts.
So it looks like the only difference is that mandamus is directed against a government official (which may be not a party to a proceeding?), while injunction is directed to a party of a proceeding.
Is this the only difference?
What if the party of a proceeding is a government official?
Would he receive a mandamus or an injunction?