Fixes #4301 Use module_common functions for mysqldump and return better errors