Wait, what? Did you seriously type that?
I can picture it now. The DM says, "Sorry your PC got lynched, man, but it's totally not my fault. I don't control the world or determine how NPCs react or anything like that. I'm just a channeler, through which the personalities and beliefs of the NPCs flow. I'm just playing my world, man! I'm just playing my world in character."
Gah.
I try to capture a very medieval fantasy feel. The world is brutal, insular, paranoid, and usually dirty. The darkest fears brewed up by that brutality, insularity and paranoia of the real pre-modern world (any culture really, not just European), are really incarnated and manifest in the fantasy world so arguably its a more brutal, paranoid, insular, and vile place.
I'll be upfront and tell any player that wants to play a wizard, shaman or sorcerer that ordinary people will be paranoid, intolerant and even outright hostile to them, that they will need to tread carefully and not escalate situations by slinging a bunch of spells every time someone is insulting or threatening to them. Otherwise, yes, it's very likely that they'll be lucky to be running from a village to avoid being lynched. Ordinary people tend to deal with the enormous power of wizards by drugging them, trying to murder them in their sleep, and/or burning them at the stake once they are in their power. They don't like the idea that someone can take control of their mind or call monsters out of thin air or burn whole mobs with a simple gesture. It scares them and whatever you are scared of you come to hate. Further, there are whole stretches of the campaign world were wizards and sorcerers are treated as fiends and where officially practicing wizardry or being born a sorcerer carries presumptive death penalty.
And some of those places are even nominally 'good guys' fighting the good fight against darkness and evil.
Likewise, outside of the more cosmopolitan settings I tend to start in, everyone will tend to be high xenophobic to even members of their own race, much less anything wierd looking. And even if you are in say, Daros or Thyr, if you go walking off into the Dwarf quarter without a Dwarf companion, you better be really personable, polite (and fluent in Dwarfish) or you'll probably end up in at least a fist fight. And heaven help you if you escalate it to weapons and kill a drawf - the whole community will come down on your head and the local magistrates will probably take their side regardless of who started it.
So, while I'd probably discourage a player from playing anything that would get them killed outright and would probably try to create some sort of haven for the character even so, I somewhat empathize with the poster. There is no reason to assume that a D&D world is radically more tolerant, accepting, and cosmopolitan than the most tolerant, accepting, and cosmopolitan cultures of this world, and plenty of reason to assume that it wouldn't be.