Eigenvalues of the "Laplacian" on [0,2$\pi]\subset\mathbb{R}$ for the dirichlet eigenvalue Problem on compact and connected Riemannian manifolds, the eigenvalues of the laplacian consists of a discrete sequence.
On the other hand, if we consider $[0,2\pi]\subset\mathbb{R}$, the Eigenvalues of the laplacian $(-\frac{d^2}{dx^2})$ aren't just a discrete sequence.
What is wrong with the example above? I'm a little bit confused.

Consider the problem first without the boundary conditions:
$$-u'' = \lambda u$$
If $\lambda \leq 0$, then the general solution is a superposition of real exponential functions which can never satisfy a Dirichlet boundary condition. Otherwise, for $\lambda > 0$, the general solution is given by
$$u(x) = A\sin(\sqrt{\lambda}x) + B\cos(\sqrt{\lambda}x)$$
Now
$$u(0) = A\sin(0) + B\cos(0) = B$$
so to satisfy the Dirichlet condition at $x = 0$ we must have $B = 0$. Since eigenfunctions span subspaces of other eigenfunctions we might as well also normalize $A = 1$ so we can consider only
$$u(x) = \sin(\sqrt{\lambda}x)$$
But we also require that $u(2\pi) = 0$. This forces $2\pi \sqrt{\lambda}$ to be a integer multiple of $2\pi$ or, in other words, $\lambda \in \{k^2: k = 1,2,3,...\}$. So the eigenvalues do in fact form a discrete sequence.
