  In this paper, we first prove that the mean-field stochastic linear quadratic
(MFSLQ) control problem with random coefficients has a unique optimal control
and derive a preliminary stochastic maximum principle to characterize this
optimal control by an optimality system. However, because of the term of the
form $\mathbb{E}[A(\cdot)X(\cdot)] $ in the adjoint equation, which cannot be
represented in the form $\mathbb{E}[A(\cdot)]\mathbb{E} [X(\cdot)] $, we cannot
solve this optimality system explicitly. To this end, we decompose the MFSLQ
control problem into two constrained SLQ control problems without the
mean-field terms. These constrained SLQ control problems can be solved
explicitly by an extended LaGrange multiplier method developed in this article.
