Show that if $X$ is locally compact and $\sigma$-compact then is separable I'm trying to solve an exercise that says

Show that a locally compact space is $\sigma$-compact if and only if is separable.

Here locally compact means that also is Hausdorff. I had shown that separability imply $\sigma$-compactness but I'm stuck in the other direction.
Assuming that $X$ is $\sigma$-compact it seems enough to show that a compact Hausdorff space is separable. However I don't have a clue about how to do it. 
My first thought was try to show that a compact Hausdorff space is first countable, what would imply that it is second countable and from here the proof is almost done. However it seems that my assumption is not true, so I'm again in the starting point.
Some hint will be appreciated, thank you.

EDIT: it seems that the exercise is wrong. Searching in the web I found a "sketch" for a proof that a compact Hausdorff space is not separable:

Another natural example: take more than |R| copies of the unit interval
  and take their product. This is compact Hausdorff (Tychonov theorem) but
  not separable (proof not too hard, but omitted).
Hope this helped,
Henno Brandsma

My knowledge of topology is little and the exercise appear in a book of analysis (this is a part of the exercise 18 on page 57 of Analysis III of Amann and Escher.)
My hope is that @HennoBrandsma (an user of this web) appear and clarify the question :)
 A: As I said, you cannot say in general that a locally compact space is separable iff it is $\sigma$-compact. 
There are many classic compact spaces that are not separable, e.g. $[0,1]^I$ where $|I| > \mathfrak{c}$, and the lexicographically ordered square $[0,1] \times [0,1]$ in the order topology or the Alexandroff double of $[0,1]$ etc. All such spaces are trivially $\sigma$-compact and locally compact, so they disprove the right to left implication.
But the stated fact is true if we restrict ourselves to metric or metrisable spaces, (or in fact any class of spaces where separability is equivalent to Lindelöfness):
Suppose $X$ is separable, then for a metric space this implies that $X$ is Lindelöf  and so as $X$ has an open cover of open sets with compact closures (being locally compact) it has a countable such cover as well. Hence $X$ is then $\sigma$-compact. On the other hand, if $X$ is $\sigma$-compact, it’s Lindelöf (this implication holds in general spaces) and hence separable.
A: take $\omega_1+1$ with the order topology. This is compact Hausdorff, but not separable. (That is, take the space of all countable ordinals, together with the first uncountable ordinal, with the order topology. This is not first countable either. As a comment suggest, perhaps the author meant that only metrizable spaces are considered?) 
A: Not sure if this is part of what you're wondering about, but will fill in the proof Henno omitted (slightly too long for a comment). 
Let $\kappa >|\mathbb R|,$ $U$ and $U’$ be disjoint, open proper subsets of $I=[0,1],$ and for $\alpha<\beta<\kappa$ define $U_{\alpha,\beta} \subseteq I^\kappa$ to be the basis open set with $U$ at the $\alpha$-th, position, $U’$ at the $\beta$-th position and $I$ everywhere else. Let $D\subset I^\kappa$ be countable and label $D=\{f_1,f_2,\ldots\}.$
Then, for $\alpha<\kappa$ define the subset of $\mathbb N$ $$ A_\alpha = \{i\in\mathbb N: f_i(\alpha)\in U\}.$$ Since $\kappa > 2^{\mathbb N},$ by pigeonhole, there are $\alpha<\beta < \kappa $ such that $A_{\alpha}=A_\beta.$ So $\forall f\in D,$ either $f(\alpha)\in U$ and $f(\beta)\in U$ or $f(\alpha)\in I\setminus U$ and $f(\beta)\in I\setminus U.$ Thus $D\cap U_{\alpha,\beta} = \emptyset,$ so $D$ is not dense.
