It can be proved that the set $A = \left\{ {p:{p^2} < 3,\, p \in {\Bbb Q^+}} \right\}$ has no greatest element (see this). From this it is easy to conclude that the set $E = \{x\in\mathbb{Q}: 2 < x^2 < 3\}$ also does not contain a greatest element.
Recall that closed subsets of compact spaces are also compact.
We use the above in the following two solutions. Note that these demonstrations do not require the construction of the real numbers or the fact that compactness in a metric space is equivalent to being sequentially compact.
Solution 1:
Enumerate all the elements of the countable set $E$ with a sequence $(p_k)_{\, k \in \mathbb N}$. Define closed sets in $\mathbb{Q}$ as follows:
$\tag 1 I_n = [max(p_1,p_2,\dots,p_n), +\infty) \; \bigcap \; E$
The sequence of nonempty closed sets $I_n$ is a decreasing chain $A_{n+1} \subset A_n$. If we assume that $E$ is compact, then we can apply Cantor's intersection theorem and conclude that the intersection of all the $I_n$ must be nonempty. But by design no $p_j$ can be in this intersection (no greatest element), a contradiction.
Solution 2:
We define $r_1 = 1.7$ so that $r_1 \in E$. We recursively define
$\tag 2 r_{n+1} = r_n + d \, 10^{-(n+1)} \text{, } d \in \{0,1,\dots,9\} \text{ largest digit | } r_{n+1} \in E$
Define closed sets in $\mathbb{Q}$ as follows:
$\tag 3 I_n = [r_n, +\infty) \; \bigcap \; E$
The sequence of nonempty closed sets $I_n$ is a decreasing chain $A_{n+1} \subset A_n$. If we assume that $E$ is compact, then we can apply Cantor's intersection theorem and conclude that the intersection of all the $I_n$ must be nonempty. But if $q$ is any point in $E$ it is easy to see that some $r_m$ must be greater than $q$, leading to a contradiction.