Mitra (Proto-Indo-Iranian: *mitrás) is the name of an Indo-Iranian divinity from which the names and some characteristics of Rigvedic Mitrá and Avestan Mithra derive.
The names (and occasionally also some characteristics) of these two older figures were subsequently also adopted for other figures:
A vrddhi-derived form of Sanskrit mitra gives Maitreya, the name of a bodhisattva in Buddhist tradition.
In Hellenistic-era Asia Minor, Avestan Mithra was conflated with various local and Greek figures leading to several different variants of Apollo-Helios-Mithras-Hermes-Stilbon.
Via Greek and some Anatolian intermediate, the Avestan theonym also gave rise to Latin Mithras, the principal figure of the first century Roman Mysteries of Mithras (also known as 'Mithraism').
In Middle Iranian, the Avestan theonym evolved (among other Middle Iranian forms) into Sogdian Miši, Middle Persian and Parthian Mihr, and Bactrian Miuro (/mihru/). Aside from Avestan Mithra, these derivative names were also used for:
Greco-Bactrian Mithro, Miiro, Mioro and Miuro;
by the Manichaeans for one of their own deities.
Additionally, the Manichaeans also adopted 'Maitreya' as the name of their "first messenger".
Both Vedic Mitra and Avestan Mithra derive from an Indo-Iranian common noun *mitra-, generally reconstructed to have meant "covenant, treaty, agreement, promise." This meaning is preserved in Avestan miθra "covenant." In Sanskrit and modern Indo-Aryan languages, means "friend," one of the aspects of bonding and alliance.
The Indo-Iranian reconstruction is attributed to Christian Bartholomae, and was subsequently refined by A. Meillet (1907), who suggested derivation from the Proto-Indo-European root *mey- "to exchange."
A suggested alternative derivation was *meh "to measure" (Gray 1929). Pokorny (IEW 1959) refined Meillet's *mei as "to bind." Combining the root *mei with the "tool suffix" -tra- "that which [causes] ..." (also found in man-tra-, "that which causes to think"), then literally means "that which binds," and thus "covenant, treaty, agreement, promise, oath" etc.