Example 1 Find the integer solutions of the equation $x^{2}-12 x+y^{2}+2=0$.
Solution: The equation is $(x-6)^{2}+y^{2}=34$. Clearly, $y^{2} \leqslant 34$, thus $y^{2}=0,1,4,9,16,25$.

Testing shows that only when $y^{2}=9$ or 25, $34-y^{2}$ is a perfect square. $\therefore$ The solutions to the original equation are:
$$
\begin{array}{l}
(x, y)=(11,3),(1,3),(11,-3),(1,-3), \\
(9,5),(3,5),(9,-5),(3,-5) .
\end{array}
$$