Let $M$ be the mass of the earth, considered as a point mass, then the potential energy of a point with distance $r$ away from the center (assume $r > \textrm{radius of earth})$ is $$ U(r) = -\frac{G M m} r = -\frac{gm}{r} $$ with $g := G\cdot M$. Now, as it is written in the textbooks, the potential energy of a body of height $h$ on earth is approximately $$ U(h) = mgh. $$ Now for me both expression contradict each other, one is negative, the other positive, one decreases as $r \to \infty$, the other increases as $h \to \infty$ (and the height is directly related to the distance/radius $r$ I think).
So whats my misconception, what have I missed that I came to conclusion that both expression contradict each other? Thanks for any help!
EDIT: Changed $$ U(r) = -\frac{GM}{r} = -\frac{g}{r} $$ to $$ U(r) = -\frac{GMm}{r} = \frac{gm}{r}. $$