Let $x, y$ be integers and $p$ be a prime for which

\[ x^2-3xy+p^2y^2=12p \]
Find all triples $(x,y,p)$.
1. Start with the given equation:
   \[
   x^2 - 3xy + p^2 y^2 = 12p
   \]
   Rewrite it in the standard quadratic form:
   \[
   x^2 - 3xy + p^2 y^2 - 12p = 0
   \]

2. Consider the discriminant of this quadratic equation in \(x\):
   \[
   \Delta = (-3y)^2 - 4 \cdot 1 \cdot (p^2 y^2 - 12p)
   \]
   Simplify the discriminant:
   \[
   \Delta = 9y^2 - 4(p^2 y^2 - 12p) = 9y^2 - 4p^2 y^2 + 48p
   \]
   \[
   \Delta = (9 - 4p^2)y^2 + 48p
   \]
   For \(x\) to be an integer, \(\Delta\) must be a perfect square:
   \[
   (9 - 4p^2)y^2 + 48p = d^2
   \]

3. Analyze the case when \(p \neq 3\):
   - Since \(p\) is a prime, \(p \equiv 1 \pmod{3}\) or \(p \equiv 2 \pmod{3}\).
   - If \(p \neq 3\), then \(p^2 \equiv 1 \pmod{3}\).
   - Substitute \(p^2 \equiv 1 \pmod{3}\) into the discriminant:
     \[
     9y^2 - 4p^2 y^2 + 48p \equiv 9y^2 - 4y^2 + 48p \equiv 5y^2 + 48p \pmod{3}
     \]
     \[
     5y^2 + 48p \equiv 2y^2 \equiv d^2 \pmod{3}
     \]
   - The quadratic residues modulo 3 are 0 and 1. Therefore, \(2y^2 \equiv 0 \pmod{3}\) or \(2y^2 \equiv 1 \pmod{3}\).
   - Since \(2 \equiv 2 \pmod{3}\), \(2y^2 \equiv 0 \pmod{3}\) implies \(y \equiv 0 \pmod{3}\).

4. Conclude that \(y\) must be a multiple of 3:
   - Let \(y = 3y_1\):
     \[
     x^2 - 3x(3y_1) + p^2 (3y_1)^2 = 12p
     \]
     \[
     x^2 - 9xy_1 + 9p^2 y_1^2 = 12p
     \]
   - Since \(3\) divides the left-hand side but not the right-hand side, this leads to a contradiction unless \(p = 3\).

5. Consider the case \(p = 3\):
   - Substitute \(p = 3\) into the original equation:
     \[
     x^2 - 3xy + 9y^2 = 36
     \]
   - Factor out 3 from the equation:
     \[
     3(x^2 - xy + y^2) = 36
     \]
     \[
     x^2 - xy + y^2 = 12
     \]

6. Solve the quadratic equation \(x^2 - xy + y^2 = 12\):
   - Check the discriminant:
     \[
     \Delta = (-y)^2 - 4 \cdot 1 \cdot (y^2 - 12) = y^2 - 4y^2 + 48 = -3y^2 + 48
     \]
     \[
     \Delta = 48 - 3y^2
     \]
   - For \(\Delta\) to be a perfect square, \(48 - 3y^2 = k^2\) for some integer \(k\).

7. Find integer solutions for \(y\):
   - Check possible values of \(y\):
     - \(y = 0\):
       \[
       x^2 = 12 \implies x = \pm \sqrt{12} \implies x = \pm 6
       \]
     - \(y = 2\):
       \[
       x^2 - 2x + 4 = 12 \implies x^2 - 2x - 8 = 0
       \]
       \[
       x = \frac{2 \pm \sqrt{4 + 32}}{2} = \frac{2 \pm 6}{2} \implies x = 4 \text{ or } -2
       \]
     - \(y = -2\):
       \[
       x^2 + 2x + 4 = 12 \implies x^2 + 2x - 8 = 0
       \]
       \[
       x = \frac{-2 \pm \sqrt{4 + 32}}{2} = \frac{-2 \pm 6}{2} \implies x = 2 \text{ or } -4
       \]

8. List all solutions:
   - \((p, x, y) = (3, 6, 0), (3, -6, 0), (3, 4, 2), (3, -2, 2), (3, 2, -2), (3, -4, -2)\)

The final answer is \( \boxed{ (3, 6, 0), (3, -6, 0), (3, 4, 2), (3, -2, 2), (3, 2, -2), (3, -4, -2) } \)