5. Find all pairs of positive integers $(m, n)$ such that $6^{m} + 2^{n} + 2$ is a perfect square.
5. Solution: When $m \geqslant 2, n \geqslant 2$, $6^{m}+2^{n}+2=2(3 \times 6^{m-1}+2^{n-1}+1)$ contains only one 2, hence it is not a perfect square.
When $m \leqslant 1$ or $n \leqslant 1$,
(1) When $m=0$, for $n \geqslant 2$, $6^{m}+2^{n}+2=$ $2^{n}+3 \equiv 3(\bmod 4)$ is not a perfect square. From $n=0,1$, we know $(m, n)=(0,0)$;
(2) When $m=1$, $6^{m}+2^{n}+2=2^{n}+8$, for $n \geqslant 4$, $2^{n}+8=8\left(2^{n-3}+1\right)$ is not a perfect square. Other cases yield $(m, n)=(1,0),(1,3)$;
(3) For $n=0,1$, similarly, we get $(m, n)=(0,0)$, $(1,0)$. All solutions are $(0,0),(1,0),(1,3)$.