Zariski cotangent space of global sections vs Zariski cotangent space of stalk Assume that $(X,O)$ is a ringed space and fix $x\in X.$ 
Let $\mathfrak{m}$ be a maximal ideal in $O(X),$ such that $\mathfrak{m}_x:=\mathfrak{m}|_{O_x}$ is maximal in $O_x$.

Question. Does $\mathfrak{m}/\mathfrak{m}^2\cong \mathfrak{m}_x/\mathfrak{m}_x^2$?

I am not much of algebraic geometer so I apologies ahead, if there is some major flaw in my question. Be understanding and write me a comment, if there are errors.
I added complex-analysis tag, cause I believe that the answer is NO. Example I have in mind is the ringed space of holomorphic functions with ideal consisting of functions vanishing at a point. However I can't prove that it is a good example.
 A: Let $X=\{0,1\}$, topologized such that $\{0\}$ is open by $\{1\}$ is not.  Let $k$ be your favorite field, and define a sheaf of rings on $X$ by $\mathcal{O}(X)=k[x]$ and $\mathcal{O}(\{0\})=k$, with the restriction map sending $x$ to $0$.  Then the maximal ideal $\mathfrak{m}=(x)\subset\mathcal{O}(X)$ has $\mathfrak{m}/\mathfrak{m}^2\cong k$ but $\mathfrak{m}_0/\mathfrak{m}_0^2=0$ since $\mathfrak{m}_0=0$.
(Replacing $k[x]$ by a local ring, we can even get a counterexample for a locally ringed space.)
A: As Eric Wofsey's reply shows, you need to put rather restrictive conditions on your ringed space to have any hope for this to be true. Here is one:
If $O_x$ is the localization of $O(X)$ at $\mathfrak{m}$, then this is true as localization (i.e. $-\otimes_{O(X)} O_x$) and taking quotients (i.e. $-\otimes_{O(X)} O(X)/\mathfrak{m}$) commute. 
This situation happens frequently in algebraic geometry, and seems to also happen in the complex geometry world (a world I am not very experienced with, so take that with a grain of salt)
