The optimal control problems for stationary magnetohydrodynamic equations under the inhomogeneous mixed boundary conditions for a magnetic field and the Dirichlet condition for velocity are considered. The role of controls in the control problems under study is played by normal and tangential components of the magnetic field given on different parts of the boundary and by the exterior current density. Quadratic tracking-type functionals for velocity, magnetic field or pressure are taken as cost functionals. The global solvability of the control problems under consideration is proved, an optimality system is derived and, based on its analysis, a mathematical apparatus for studying the local uniqueness and stability of the optimal solutions is developed. On the basis of the developed apparatus, the local uniqueness of solutions of control problems for specific cost functionals is proved, and stability estimates of optimal solutions are established.