Plutarch said this quote

To make no mistakes is not in the power of man but from their errors and mistakes the wise and good learn wisdom for the future.