Generating MySQL Database Documentation for Confluence with MySQL Workbench Plugin

The MySQL Workbench can nicely  generate a Entity Relationship model from your existing MySQL Database. After Installing click in the column labelled “Data Modelling” on the link below to “Create EER model from existing database”. Follow the wizard to have a generated diagram including your existing tables and their related information. Don’t forget to save the new ER model as *.mwb file.

For Documentation in a  project is Confluence as Wiki very good compared to other ones like MediaWiki.

I have written a small plugin to MySQL Workbench as Lua Script to generate Database Model Documentation as Confluence Markup. If you are interested look here for Documentation about the available classes to use in your own scripts.

Part of the generated output from the sample database world from MySQL shown as result in Confluence:


  1. Download this Script here or from github
  2. Start your MySQL Workbench
  3. Choose from the “scripting” menu the entry “Install Plugin/Module…”
  4. Change Drop down in the Dialog to File type “lua Files..”
  5. Choose downloaded File and click open
  6. Restart Workbench
  7. Open previously generated ER model file *.mwb
  8. Choose from the “Plugins” menu the entry “Catalog” and their the new entry “Confluence Markup Exporter…”
  9. Markup is now in the clipboard
  10. Open in Confluence an existing page or create a new onw
  11. Click on “Edit” button and go to tab “Wiki Markup”
  12. Paste the generated documentation and click on “save” button