12. Given a positive integer $m$ that satisfies $m^{2}+5 m+30$ is a perfect square. Then the value of $m$ is $\qquad$ .
12.21 or 1 .

By $(m+2)^{2}<m^{2}+5 m+30<(m+6)^{2}$, then
$$
\begin{array}{l}
m^{2}+5 m+30 \\
=(m+3)^{2},(m+4)^{2},(m+5)^{2} .
\end{array}
$$

Solving yields $m=21, \frac{14}{3}$ (discard) ,1.