TITLE: Example of different schemes with the same space and stalks
QUESTION [7 upvotes]: What is an example of two non-isomorphic schemes $(X,\mathcal{O}_X)$ and $(X,\mathcal{O}_X')$ with the same topological space such that there are isomorphisms $\mathcal{O}_{X,p}\cong \mathcal{O}_{X,p}'$ of all stalks?

REPLY [5 votes]: Let $X$ be the affine line over $k$ (say the algebraic closure of a finite field), let $Y$ be the complement of a closed point in $X$. Let $f : X\to Y$ be any bijection sending the generic point of $X$ to that of $Y$. Then $f$ is a homeomorphism, $O_{X,x}\cong O_{Y,f(x)}\cong k[T]_{Tk[T]}$ for all closed points $x\in X$, and $O_{X,\xi}\cong O_{Y,f(\xi)}=k(T)$ for the generic point $\xi$ of $X$
Now let $O_{X}'=f^{-1}O_Y$. Then $(X, O_X)$ and $(X, O_{X}')$ satisfy your requirement and there are not isomorphic to each other because the second scheme is isomorphic to $(Y, O_Y)$, and $O(X)$ is not isomorphic as a ring to $O(Y)$ ($O(X)^{\star}$ is torsion group but not $O(Y)^{\star}$).