Different definition of sheaf cohomology It could be related to my previous question here.
Let $\mathcal F$ be a sheaf on a topological space $X$. Hartshorne in his book on Algebraic geometry defines the sheaf cohomology by
$$
H^i(X, \mathcal F)= R^i\Gamma(X,-)(\mathcal F)$$
Alternatively in some other literature (like this) one defines the sheaf cohomology for a coherent sheaf $\mathcal E$ by putting $$H^i( X, \mathcal E) = \mathrm{Ext}^i( \mathcal O_X, \mathcal E) \equiv \mathrm{Hom}_{D^b(\mathrm {Coh}(X))} (\mathcal O_X, \mathcal E[i])$$ in the setting of derived category of $X$.

How to relate these seemingly two different definitions of sheaf cohomology agree? Notice that the latter definition only applies for coherent sheaves, so can I say the first definition of sheaf cohomology is better? Can I rewrite the first definition using the derived category?

 A: There are two separate issues that are getting mixed up here, as Tyler's comment above indicates: 


*

*The point addressed in Mariano's answer: on the category of coherent sheaves, the functor of sections and $\mathrm{Hom}(\mathcal{O}_X,-)$ are isomorphic and thus have the same derived functor.

*The question of why the derived functor of sections on coherent sheaves is the same as when it is computed in the category of sheaves of abelian groups (on such a sheaf which happens to be coherent).  This follows because every quasi-coherent sheaf has a quasi-coherent flasque resolution (Godement's canonical one), and you can check that flasque sheaves have trivial sheaf cohomology computed in either category (this argument is in the relevant section of the Stacks Project: http://stacks.math.columbia.edu/tag/09SV).


Note, this is true for $\mathcal{O}_X$ any sheaf of rings on any topological space; in particular, for sheaves of abelian groups, the same statement is true for the sheaf $\mathbb{\underline{Z}}_X$ of locally constant $\mathbb{{Z}}$-valued functions.
A: Taking global sections is the same thing as computing the hom from $O_X$. In other words, there is an isomorphism of functors $\Gamma(X,-)\cong\hom(O_X,-)$, so both functors have the same derived functors.
As for using the derived category to define cohomology: yes, simply because that is what the derived category is for! 
