  In this paper we are concerned with the global well-posedness of solutions to
magnetohydrodynamics (MHD) boundary layer equations in analytic function
spaces. When the initial data is a small perturbation around a selected
profile, and such a profile is governed by an one dimensional heat equation
with a source term, we establish the global in time existence and uniqueness of
analytic solutions to the two dimensional (2D) MHD boundary layer equations. It
is noted that the far-field state of velocity is not required to be small
initially, but decays to zero as time tends to infinity with suitable decay
rates. The whole analysis is divided into two parts: When the initial far-field
states are not small, we reformulate the original problem into a small
perturbation problem by extracting a suitable background profile which is
governed by a heat equation, then we prove a long-time existence of solutions,
and the lower bound of lifespan of solutions is given in term of the small
parameter of initial perturbation; After establishing the long-time existence,
combining the decay properties of far-field state and the properties of
solutions to the heat equation, it is shown that both the solution obtained in
the first part and the background profile indeed satisfy some smallness
requirements when time goes to the lower bound of lifespan of solutions. Then
we can show the global existence of solutions after this moment.
