The right solution is most times to check the exit status of the given application. After all, that's what the exit status is for.
mysqldump will spit an integer when it's done running. Usually, 0 means success, and any other things means that something bad happened. The concrete value can be used for different errors. Usually, the man of info page should specify that.
In any case, this return code can be used in many ways to branch your script depending on the success of failure of a given instruction.
In addition, in bash, 0 is true, while anything else is false. So, you could perfectly do something like:
while ! <command>
That will loop indefinitely until the exit status of <command> is zero (success).
You can even use the logical AND and OR operators to bifurcate
<command> && <to_do_if_success> || <to_do_if_not>