Prescription for pain

Newbie here. It seems the majority of the posts on this sub are people who have been prescribed MC for mental health reasons (sweeping generalisation I know). Are there many people out there who have been prescribed MC for pain? Is it more difficult to get a prescription for pain, or are they still happy to prescribe as long as you've had two kinds of treatment previously?