Purana Jyotisha Sangraha · by Vyasa
Chapter 12 · Prabhasa and the Planet Lingas
स्कन्दपुराणम् : प्रभासक्षेत्रे ग्रहलिङ्गानि
बुधेन चैव देवेशि तत्र तप्तं महातपः ।स्थापितं विमलं लिंगं समाराध्य सदाशिवम् ॥ ३ ॥
From the Skanda Purana, print Prabhasa Khanda (Prabhasa-kshetra-mahatmya) ch 46, verse 3.
There Mercury did great austerity, O Goddess of gods. He set up a spotless linga and worshipped Sadashiva.
Simple meaning: Mercury did great austerity here and set up the linga.
वर्षायुतानि चत्वारि संपूज्य तु विधानतः ।
After forty thousand years of worship Shiva appeared before Mercury.
ततस्तुष्टमना देवो ग्रहत्वं तस्य तद्ददौ ।
Shiva made Mercury a planet. Worship here on a Wednesday 8th day is said to give a great reward.
न दाभाग्यं कुले तस्य न चैवेष्टवियोजनम् ।
The text says Mercury's linga keeps misfortune, separation and fear of enemies away.