One way of constructing a local ring is to start with any commutative ring, and localize all the elements outside of some maximal ideal (i.e., adjoining inverses to all those elements). But I'm wondering: can every local ring be constructed in this way? Obviously, a local ring is the localization of itself at its unique maximal ideal, but is there always a non-local ring which localizes to our ring?
Edit: As noted in the comments, $R\times k$ works for any commutative ring $k$, so what about if we don't allow disconnected rings?