Safer implementation of the mysqldump.