Failure is the mother of success
Used to comfort someone that has failed at something.
Failure teaches success.