If you are using MySQL Workbench 8.x to export from earlier versions of MySQL databases (like 5.x) it will likely error out with Operation failed with exitcode 2
This is a known problem with older versions of MySQL Workbench and the solution is to upgrade to MySQL Workbench 8.2:
- Install the prerequisite Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 direct from Microsoft HERE.
- Download MySQL Workbench 8.2 (or newer) directly from Oracle HERE
- Run the Workbench 8.2 installer
- It does not tell you it is upgrading, but that is what it does
- Run your backup again