What does Mary Mean?

Mary is a Hebrew name that means bitter. Ouch! You would think that Mary would mean merry as in happy. Someone must of had a pretty painful delivery to name their baby that. The funny thing is all the Marys I know are just the opposite, they are sweet. Who ever started the name got it wrong.