I am currently testing Privileged Access Management solutions. I have a need to open the MySQL Workbench with a command line that specifies the server name, and user/password of the privileged account that is being used for that session.
In MSFT SQL Server Studio, you can start it with '-S servername -U username -P password' There doesn't seem to be a straightforward way to do this using the MySQL Workbench. There is a '-query' option, but I can't find anything that specifies how to fully start the app with those parameters supplied dynamically.
Can anyone suggest a way to do this with MySQL Workbench?
Best Answer
You can use the
query
parameter and give it the name of one of the connections you have defined (similar for theadmin
parameter). This will open a SQL IDE tab with that connection.Instead of a predefined connection you can also use the usual command line params
-h127.0.0.1 -uroot -P3306
in conjunction with thequery
andadmin
parameters.For details how this is parsed look in
wb_utils_grt.py
(connectionFromString(connstr)
).Update:
The documentation says: