MySQL Blog Archive
For the latest blogs go to
MySQL Workbench: Lua Plugin Support

The Lua plugin support has been finally fixed and will be working in the next release. Together with a few other improvements, it’s now possible to write your own commands to do all kinds of tasks. Documentation for the plugin system is not yet written (and the previous one is outdated), but it should be straightforward to copy the supplied Lua plugin and change it to do something else. All you need is to know a little Lua (which is a simple scripting language) and explore Workbench internals using the GRT Shell (View -> Advanced -> GRT Shell).The sample Lua plugin is located in the modules folder. You can copy it to the custom plugins folder which is shown in the GRT Shell at startup and change things like the module name and add your own functions. I’ll write more about how to write such functions in a future post, like after the next WB is actually released.There are a few ways that plugins can be accessed, including just calling them from the GRT Shell, from the main menus (which you can change in the main_menu.xml file or in a menu editor when its written) or from context menus for the objects that the plugin supports. In fact, most functionality of Workbench works the same way as plugins, so there’s a lot that can be done.

Author: Mike Lischke

Team Lead MySQL Workbench