Bug #95924 Workbench: cannot open script in connection from Windows command prompt
Submitted: 21 Jun 2019 18:34 Modified: 12 Jul 2019 5:07
Reporter: Kevin Hollingshead Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.15, 8.0.16 OS:Windows (10 (Runing under Parallels on Mac Mojave)
Assigned to: CPU Architecture:x86
Tags: --query, --script, cmd, command prompt, windows, workbench

[21 Jun 2019 18:34] Kevin Hollingshead
Description:
I'm trying to open a sql script in Workbench from a Windows 10 command prompt, but the combination of the --query and --script options doesn't work. I'm referring to the docs here:

https://dev.mysql.com/doc/workbench/en/wb-launching-windows.html

Note that, as the sole option, --query (two dashes) opens the connection, although one dash as shown in the spec does not.

Note also that -script works in isolation.

How to repeat:
Here's the full command (per docs)

"C:\Program Files\MySQL\MySQL Workbench 8.0 CE\MySQLWorkbench.exe" --query VSLaunch -script "Migration003.sql"

This launches Workbench and makes the named connection, but the script is not opened, just the default editor window.

The -script option works in isolation, but opens the script in an unconnected editor, e.g.

"C:\Program Files\MySQL\MySQL Workbench 8.0 CE\MySQLWorkbench.exe" -script "C:\tmp\Migration003.sql"

Suggested fix:
Make the combination of --query and -script command line options work properly together (and fix the docs).
[22 Jun 2019 7:53] MySQL Verification Team
Hello Kevin,

Thank you for the report and feedback.
Verified below scenario with WB 8.0.16 on Win10:
(i) with --(double hyphen)
MySQLWorkbench.exe --query UShastry --script "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\test.sql" <-- WB launched, specified named connection opened but the script is not opened, just the default editor window.
(ii) with - (single hyphen)

MySQLWorkbench.exe -query UShastry -script "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\test.sql" <-- WB launched, unconnected, sql script is opened.

regards,
Umesh
[12 Jul 2019 5:07] Kevin Hollingshead
Any idea where this is in the queue? Any recommendations for a good MySQL editor with intellisense-ish features and syntax error indication?