Bug #92425 MySQL Workbench 8.0.12: hard to dump (Data Export) MySQL 5.5 database
Submitted: 14 Sep 2018 15:05 Modified: 17 Sep 2018 15:53
Reporter: Mauro Molinari Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:8.0.12 OS:Windows
Assigned to: CPU Architecture:Any

[14 Sep 2018 15:05] Mauro Molinari
Description:
I recently upgraded from MySQL Workbench 6.3.10 to 8.0.12 and now it's quite hard to export data from a MySQL 5.5 server table.

How to repeat:
Connect to a MySQL 5.5 server.
Go to Server | Data Export, select a schema, select "Export to Self-Contained File" and type a .sql file name, then "Start Export"

Using the embedded mysqldump, a warning says that there's a server vs client version mismatch. The warning says to use a mysqldump version >= of the server version. This is a first error: I'm actually using the embedded mysqldump which is 8.0.x on a 5.5 server, so there should be no problems. So, I continue anyway, but I get the following error:

16:32:18 Dumping myschema (all tables)
Running: mysqldump.exe --defaults-file="c:\path\tmpjtlglg.cnf"  --set-gtid-purged=OFF --user=mmolinari --host=myhost --protocol=tcp --port=3306 --default-character-set=utf8 --single-transaction=TRUE --skip-triggers "myschema"
mysqldump: Couldn't execute 'SELECT COLUMN_NAME,                       JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')                FROM information_schema.COLUMN_STATISTICS                WHERE SCHEMA_NAME = 'fatturapa-cust-01238650624' AND TABLE_NAME = 'Allegato';': Unknown table 'COLUMN_STATISTICS' in information_schema (1109)

Operation failed with exitcode 2
16:32:19 Export of C:\Users\mmolinari\Documents\dumps\myschema.sql has finished with 1 errors

Then, I configure MySQL Workbench to use mysqldump.exe from MySQL 5.5 Server (by the way, I have to download the whole MySQL Server ZIP file to get this small utility...), through Edit | Preferences | Administration | Path to mysqldump Tool. Repeating the above steps now shows no warning, but the export fails all the same:

16:43:50 Dumping myschema (all tables)
Running: D:\tools\mysqldump\mysqldump-5.5.exe --defaults-file="c:\path\tmp4gzhqd.cnf"  --set-gtid-purged=OFF --user=mmolinari --host=myhost --protocol=tcp --port=3306 --default-character-set=utf8 --single-transaction=TRUE --skip-triggers "myschema"
mysqldump: unknown variable 'set-gtid-purged=OFF'

Operation failed with exitcode 7
16:43:50 Export of C:\Users\mmolinari\Documents\dumps\myschema.sql has finished with 1 errors

It's clear that MySQL Workbench is specifying a command line switch that is not supported by mysqldump 5.5.

Then I download mysqldump 5.7, configure MySQL Workbench to use it and repeat again the above steps. The warning about the version mismatch is shown again, but this time the export is completed successfully...

Suggested fix:
Isn't it possible to bundle multiple versions of mysqldump with MySQL Workbench? Or provide a "download manager" to download older versions?

If not, is it at least possible to make the embedded mysqldump work with MySQL Server 5.5?

If not, is it at least possible to make MySQL Workbench drive mysqldump 5.5 correctly?
[15 Sep 2018 0:22] MySQL Verification Team
mysqldump 8.0.12

Attachment: 92425.png (image/png, text), 108.31 KiB.

[15 Sep 2018 0:23] MySQL Verification Team
mysqldump 5.5

Attachment: 92425_1.png (image/png, text), 119.62 KiB.

[15 Sep 2018 0:25] MySQL Verification Team
Thank you for the bug report. I couldn't repeat changed the path for a mysqldump version 5.5, please attached pictures.
[17 Sep 2018 15:40] Mauro Molinari
Hi Miguel,
today exporting with mysqldump 5.5 seems to work for me, too, but this time I closed MySQL Workbench and reopened it before starting the export operation.
Maybe having the "Data Export" tab open and changing the mysqldump executable from one version to the other "on the fly" last week did not flush something, so that MySQL Workbench kept on specifying unsupported command line switches to mysqldump-5.5?
[17 Sep 2018 15:53] Mauro Molinari
Here is how to reproduce:

- start MySQL Workbench, ensure no external mysqldump.exe file path is set in preferences
- connect to a MySQL Server 5.5 
- do Server | Data Export
- select a schema, select "Export to Self-Contained file", hit "Start Export"
- the warning message is shown (as per your screenshot). Please note that this warning message is clearly badly written (in this case the embedded mysqldump.exe IS a version >= of the server version!)
- continue anyway
- export fails
- without closing the Administration tab, go to Edit | Preferences... | Administration and insert path to a mysqldump 5.5 version executable
- press OK to close the Preferences dialog
- press Start Export to retry the export
- the export fails!

Go to Object Selection tab, then Start Export and the export fails again.
You have to completely close the Administration tab and restart the operation from scratch in order to make export succeed.
[13 Jan 2019 16:13] Carlos Lopez
Not the best solution, but it works.
 Donwgrade Workbench to v.6.3.10 which is available in https://downloads.mysql.com/archives/workbench/

Now the backup works with no problem

Hope it can helps to all with the same problem.