Bug #7844 | Command Line Parameters | ||
---|---|---|---|
Submitted: | 12 Jan 2005 18:52 | Modified: | 5 Nov 2008 12:15 |
Reporter: | [ name withheld ] | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Query Browser | Severity: | S4 (Feature request) |
Version: | OS: | Windows (Windows) | |
Assigned to: | Mike Lischke | CPU Architecture: | Any |
[12 Jan 2005 18:52]
[ name withheld ]
[5 Nov 2008 9:30]
Daniel Engels
This would be a very useful feature for me. I have to handle a lot of mysql servers. If I had commandline options, I would be able to write a frontend to search for servers and automatically connect to the server with the query browser.
[5 Nov 2008 12:15]
Mike Lischke
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at http://www.mysql.com/downloads/ FYI: MySQL Query Browser supports command line parameter already for a long time, though it is still a GUI application, which is not made for non GUI tasks. Whatever you want to do without a GUI can better be done by the normal mysql CLI. The following command line parameters are supported. You can use a space between the option and its value or you can ommit it (which could lead to misinterpreting options, as there are a few using two chars): Common among all GUI tools --------------------------- -c connection-name (use the stored connection) -u user -p password -P port -h host -D default-schema -x hex-password Specific to QB (note the sometimes slightly different form): ------------------------------------------------------------ -startsection=section-nr (this is actually useful for MA, not sure why it is supported in QB too) -selecttable=table-name (a table to show right from the start) -qs script-file-name and -qb script-name (scripts to execute) -sql "query text", -sql2 and -sql3 (some statements to execute at startup, note: sql2 is only handle if also sql is given and sql3 only if sql2 was specified) Every other text which does not start with a minus is considered to be a file name to a script to execute. In fact -qs and -qb are old style versions of that and only there for backwards compatibility.
[5 Nov 2008 15:34]
Daniel Engels
Thanks a lot for the fast reply. Thats what I want to do. A little hint for all. I tried a lot of differnt input formats and fail If you want to establish a connection to localhost:3306 with user me and passwort secret, you have to call the application with that kind of arguments: MySQLQueryBrowser.exe -ume -psecret -P3306 -hlocalhost Spaces between the parameter and the input strings are not allowed.
[5 Nov 2008 15:40]
Mike Lischke
Spaces should be allowed. If that does not work you found a bug :-) Btw. you can omit default port and host (3306 and localhost are automatically used if not given otherwise).
[6 Nov 2008 10:58]
Daniel Engels
Hi Mike, thanks a lot. Should I submit a new bug-report? Greetings from Germany Daniel