Bug #68428 'Import from disk' fails when using SSL CA File. Involves --defaults-extra-files
Submitted: 19 Feb 2013 12:03 Modified: 4 Nov 2013 19:05
Reporter: Andrew Goode Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:5.5 OS:Microsoft Windows (7)
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: defaults-extra-files, SSL
Triage: Needs Triage: D3 (Medium)

[19 Feb 2013 12:03] Andrew Goode
In MySQL Workbench > Server Administration > Data Import/Restore:
When using Import from Disk (from Self-Contained File in this case), to a connection which has an SSL CA File specified on the 'Advanced' tab (where connection mode is Standard (TCP/IP)), after clicking 'Start Import', the operation fails with:
mysql.exe: unknown variable 'defaults-extra-file=c:\users\...'

How to repeat:
Create a new connection to a server with a SSL CA Cert file:
Connection method: Standard (TCP/IP)
On Advanced tab, check 'Use SSL if available' and provide the path to the SSL CA file.

In Server Administration, Create a server instance using this connection, then open that instance.

In Data Import/Restore > Import from Self-Contained File, provide an sql file to import and click 'Start Import'.

Suggested fix:
After searching about this, it seems the problem might be that the --defaults-extra-file parameter must be the first parameter. However, when the connection is using a CA Cert, the mysql command echoed to 'Import progress' has the --ssl-ca parameter first, before the --defaults-extra-file parameter, e.g.:

mysql.exe --ssl-ca=c:\path\cert.pem --defaults-extra-file="c:\users\user\appdata\local\temp\xxxxx.cnf" --host=xxxxx --user=xxxxx --port=3306 --default-character-set=utf8 --comments < "c:\\path\\export.sql"

I think that inserting the --defaults-extra-file parameter first in the generated command would fix this.

A problem with testing this is that the generated string references a tmp file for  defaults-extra-file, which is deleted after the error. However, I confirmed that the import works from the command line when the --defaults-extra-file is placed first, and using my my.ini file instead of the temp file.
[4 Nov 2013 19:05] Philip Olson
Fixed as of MySQL Workbench 6.0.3, and here's the changelog entry:

When executing an "Import From Disk" operation with "Data Import/Restore"
to a connection with an SSL CA File specified in the connection's
configuration, clicking "Start Import" would generate an error and fail to

Thank you for the bug report.