Purana Jyotisha Sangraha · by Vyasa
Chapter 4 · Moon at Prabhasa, Mars at Kashi
शिवपुराणम् : कालज्ञानम् उत्पाताः ग्रहक्षेत्राणि च
चन्द्रेण च तपस्तप्तं षण्मासं च निरंतरम् ।मृत्युंजयेन मंत्रेण पूजितो वृषभध्वजः ॥ ३९ ॥
From the Shiva Purana, print Kotirudra Samhita ch 14, verse 39.
The Moon did penance for six months without a break, and worshipped the bull-bannered Lord with the Mrityunjaya mantra.
Simple meaning: The text says the Moon did penance for six months with the Mrityunjaya mantra.
दशकोटिमितं मंत्रं समावृत्य शशी च तम् ।
The text says the Moon repeated the mantra ten crore times with a steady mind.
तं दृष्ट्वा शंकरो देवः प्रसन्नोऽभूत्ततः प्रभुः ।
The text says Shiva was pleased and appeared before the Moon.
वरं वृणीष्व भद्रं ते मनसा यत्समीप्सितम् ।
The text says Shiva told the Moon to choose any boon.