When I play barre chords, I get an ache in the botttom of my thumb, around the base thumb knuckle... These are just normal barre chords on the 6th and 5th string, and I am wondering why it hurts to play them as it is making guitaring very difficult and annoying, Can anyone tell me how to stop this or give advice?

Am I doing something wrong?