Bug #85278 File Import on Windows not working due to fualty command that is run.
Submitted: 2 Mar 2017 14:34 Modified: 13 Mar 2017 13:04
Reporter: Erwin de Haan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:6.3.9 build 10960321 CE OS:Microsoft Windows (10 x64)
Assigned to: CPU Architecture:Any

[2 Mar 2017 14:34] Erwin de Haan
Description:
When importing any file the log shows:

 "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" --defaults-file="c:\users\erwin\appdata\local\temp\tmpfqgmjf.cnf"  --protocol=tcp --host=localhost --user=erwin --port=63742 --default-character-set=utf8 --comments  < "F:\\Users\\Erwin\\Documents\\dumps\\dump20170302.sql"

This is a correct command line (as in put it in cmd.exe and it works)

Sadly the following thing gets executed:

"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" --defaults-file="c:\users\erwin\appdata\local\temp\tmpfqgmjf.cnf"  --protocol=tcp --host=localhost --user=erwin --port=63742 --default-character-set=utf8 --comments  < "F:\\Users\\Erwin\\Documents\\dumps\\

As the full commmand

So that is what Task manager will show.
A correct command to execute would be 

"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" --defaults-file="c:\users\erwin\appdata\local\temp\tmpfqgmjf.cnf"  --protocol=tcp --host=localhost --user=erwin --port=63742 --default-character-set=utf8 --comments

And input the file into stdin (this is what cmd does)

Server is Ubuntu xenial MySQL 5.7.17 connected via SSH.

How to repeat:
Import any files (be it self-contained or project folder)

And check task manager for the mysql.exe process and the command-line it reports. (It is also stuck at a very low memory usage.)

Use a tool like htop/top on the server to see any activity.

Now copy the reported command from workbench into a cmd.exe window and press enter. You will see a second mysql.exe spawn which rapidly rises in memory usage and network activity. (This import works flawlessly)

Suggested fix:
Run the command as a process and input the sql via the stdin (so workbench reads the file)
[3 Mar 2017 1:08] Miguel Solorzano
Please try version 6.3.9. Thanks.
[3 Mar 2017 11:36] Erwin de Haan
I have tried and reproduced the issue again in the new version.

I will attach a screenshot.
[3 Mar 2017 11:40] Erwin de Haan
Screenshot of TaskMgr and workbench when the problem occurs. About 5 minutes after starting the import. (Very small sql file)

Attachment: Taskmgr_2017-03-03_12-38-56.png (image/png, text), 89.65 KiB.

[3 Mar 2017 11:41] Erwin de Haan
Shows the working command in cmd

Attachment: cmd_2017-03-03_12-40-53.png (image/png, text), 32.33 KiB.

[13 Mar 2017 13:04] Chiranjeevi Battula
Hello Erwin,

Thank you for the bug report.
Verified this behavior on MySQL Workbench in 6.3.9 version

Thanks,
Chiranjeevi.