Given $p$ is a prime number, such that the quadratic equation
$$
x^{2}-2 p x+p^{2}-5 p-1=0
$$

has two integer roots. Find all possible values of $p$.

Because the quadratic equation with integer coefficients has integer roots, so,
$$
\Delta=4 p^{2}-4\left(p^{2}-5 p-1\right)=4(5 p+1)
$$

is a perfect square, thus, $5 p+1$ is a perfect square.
Let $5 p+1=n^{2}$. Note that $p \geqslant 2$, hence $n \geqslant 4$, and $n$ is an integer. Therefore,
$$
5 p=(n+1)(n-1) \text {. }
$$

Then at least one of $n+1$ and $n-1$ is a multiple of 5, i.e., $n=5 k \pm 1$ ($k$ is a positive integer).
Thus, $5 p+1=25 k^{2} \pm 10 k+1, p=k(5 k \pm 2)$. Since $p$ is a prime number and $5 k \pm 2>1$, we know $k=1, p=3$ or 7. When $p=3$, the given equation becomes $x^{2}-6 x-7=0$, solving for $x_{1}=-1, x_{2}=7$;
When $p=7$, the given equation becomes $x^{2}-14 x+13=0$, solving for $x_{1}=1, x_{2}=13$.
Therefore, $p=3$ or 7.