MySQL Workbench

Copyright © 2006, 2010, Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

This software is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. MySQL is a trademark of Oracle Corporation and/or its affiliates, and shall not be used without Oracle's express written authorization. Other names may be trademarks of their respective owners.

This software and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

This documentation is in prerelease status and is intended for demonstration and preliminary use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of this documentation.

The information contained in this document is for informational sharing purposes only and should be considered in your capacity as a customer advisory board member or pursuant to your beta trial agreement only. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described in this document remains at the sole discretion of Oracle.

This document in any form, software or printed matter, contains proprietary information that is the exclusive property of Oracle. Your access to and use of this material is subject to the terms and conditions of your Oracle Software License and Service Agreement, which has been executed and with which you agree to comply. This document and information contained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oracle without prior written consent of Oracle or as specifically provided below. This document is not part of your license agreement nor can it be incorporated into any contractual agreement with Oracle or its subsidiaries or affiliates.

This documentation is NOT distributed under a GPL license. Use of this documentation is subject to the following terms:

You may create a printed copy of this documentation solely for your own personal use. Conversion to other formats is allowed as long as the actual content is not altered or edited in any way. You shall not publish or distribute this documentation in any form or on any media, except if you distribute the documentation in a manner similar to how Oracle disseminates it (that is, electronically for download on a Web site with the software) or on a CD-ROM or similar medium, provided however that the documentation is disseminated together with the software on the same medium. Any other use, such as any dissemination of printed copies or use of this documentation, in whole or in part, in another publication, requires the prior written consent from an authorized representative of Oracle. Oracle and/or its affiliates reserve any and all rights to this documentation not expressly granted above.

For more information on the terms of this license, for details on how the MySQL documentation is built and produced, or if you are interested in doing a translation, please visit

If you want help with using MySQL, please visit either the MySQL Forums or MySQL Mailing Lists where you can discuss your issues with other MySQL users.

For additional documentation on MySQL products, including translations of the documentation into other languages, and downloadable versions in variety of formats, including HTML and PDF formats, see the MySQL Documentation Library.


This manual documents the MySQL Workbench SE version 5.2 and the MySQL Workbench OSS version 5.2.

If you have not yet installed MySQL Workbench OSS please download your free copy from the download site. MySQL Workbench OSS is available for Windows, Mac OS X, and Linux.

Document generated on: 2010-11-04 (revision: 23566)

Table of Contents

1. MySQL Workbench Introduction
2. MySQL Workbench Editions
3. Installing and Launching MySQL Workbench
3.1. Hardware Requirements
3.2. Software Requirements
3.3. Starting MySQL Workbench
3.3.1. Installing MySQL Workbench on Windows
3.3.2. Launching MySQL Workbench on Windows
3.3.3. Uninstalling MySQL Workbench on Windows
3.3.4. Installing MySQL Workbench on Linux
3.3.5. Launching MySQL Workbench on Linux
3.3.6. Uninstalling MySQL Workbench on Linux
3.3.7. Installing MySQL Workbench on Mac OS X
3.3.8. Launching MySQL Workbench on Mac OS X
3.3.9. Uninstalling MySQL Workbench on Mac OS X
3.4. Activation Procedure (Commercial Version)
4. Getting Started Tutorial
4.1. Administering a MySQL Server
4.2. Creating a Model
4.3. Adding Data to Your Database
5. The Home Screen
5.1. Workbench Central
5.2. Workspace
5.3. Workbench Application Minimum Window Size
5.4. Workbench Preferences
5.4.1. The General Tab
5.4.2. The Administrator Tab
5.4.3. The SQL Editor Tab
5.4.4. The Model Tab
5.4.5. The MySQL Tab
5.4.6. The Diagram Tab
5.4.7. The Appearance Tab
6. SQL Development
6.1. Open Connection to start Querying
6.2. New Connection
6.3. Edit Table Data
6.4. Edit SQL Script
6.5. Manage Connections
6.6. Manage DB Connections Dialog
6.6.1. Standard TCP/IP Connection
6.6.2. Local Socket/Pipe Connection
6.6.3. Standard TCP/IP over SSH Connection
6.7. SQL Editor
6.7.1. Main Menu
6.7.2. Toolbar
6.7.3. SQL Query Panel
6.7.4. Main Tabsheets
6.7.5. Sidebar
7. Data Modeling
7.1. Open an Existing EER Model
7.2. Create new EER Model
7.3. Create EER Model from Existing Database
7.4. Create EER Model from SQL Script
7.5. Model Editor
7.5.1. Modeling Menus
7.5.2. The Toolbar
7.5.3. EER Diagrams
7.5.4. The Physical Schemata
7.5.5. Schema Privileges
7.5.6. SQL Scripts and Model Notes
7.5.7. The History Palette
7.5.8. The Model Navigator Panel
7.5.9. The Catalog Tree Palette
7.5.10. The Layers Palette
7.5.11. The Properties Palette
7.6. EER Diagram Editor
7.6.1. The Vertical Toolbar
7.7. Working with Models
7.7.1. Creating Tables
7.7.2. Creating Foreign Key Relationships
7.7.3. Creating Views
7.7.4. Creating Routines and Routine Groups
7.7.5. Creating Layers
7.7.6. Creating Notes
7.7.7. Creating Text Objects
7.7.8. Creating Images
7.7.9. Reverse Engineering
7.7.10. Forward Engineering
7.8. Modeling Tutorials
7.8.1. Importing a Data Definition SQL Script
7.8.2. Using the Default Schema
7.8.3. Basic Modeling
7.8.4. Documenting the sakila Database
7.9. Printing
7.9.1. Printing Options
7.10. MySQL Workbench Schema Validation Plugins (Commercial Version)
7.10.1. General Validation
7.10.2. MySQL-Specific Validation
7.11. Customizing DBDoc Model Reporting Templates
7.11.1. Supported Template Markers
7.11.2. Creating a custom template
8. Server Administration
8.1. Server Administration
8.2. New Server Instance
8.3. Manage Data Import/Export
8.4. Manage Security
8.5. Manage Server Instances
8.6. Creating and Managing Server Instances
8.6.1. New Server Instance Wizard
8.6.2. Manage Server Instances Dialog
8.7. Server Administration and Configuration
8.7.1. Startup Tab
8.7.2. Configuration tab
8.7.3. Accounts tab
8.7.4. Connections tab
8.7.5. Variables tab
8.7.6. Data Dump tab
8.7.7. Logs tab
9. Extending Workbench
9.1. GRT and Workbench Data Organization
9.2. Modules
9.3. Plugins
9.4. Adding a GUI to a Plugin using MForms
9.5. The Workbench Scripting Shell
9.5.1. Exploring the Workbench Scripting Shell
9.5.2. The Shell Window
9.5.3. The Globals, Classes, and Modules Tabs
9.6. Tutorial: Writing Plugins
10. Keyboard Shortcuts
11. MySQL Workbench FAQ
A. MySQL Workbench Change History
A.1. Changes in Release 5.2
A.1.1. Changes in MySQL Workbench 5.2.30 (Not yet released GA)
A.1.2. Changes in MySQL Workbench 5.2.29 (12 October 2010 GA)
A.1.3. Changes in MySQL Workbench 5.2.28 (19 September 2010 GA)
A.1.4. Changes in MySQL Workbench 5.2.27 (01 September 2010 GA)
A.1.5. Changes in MySQL Workbench 5.2.26 (06 August 2010 GA)
A.1.6. Changes in MySQL Workbench 5.2.25 (30 June 2010 GA)
A.1.7. Changes in MySQL Workbench 5.2.24 (21 June 2010 RC)
A.1.8. Changes in MySQL Workbench 5.2.23 (Internal release only RC)
A.1.9. Changes in MySQL Workbench 5.2.22 (02 June 2010 RC)
A.1.10. Changes in MySQL Workbench 5.2.21 (12 May 2010 RC)
A.1.11. Changes in MySQL Workbench 5.2.20 (27 April 2010 beta)
A.1.12. Changes in MySQL Workbench 5.2.19 (16 April 2010 beta)
A.1.13. Changes in MySQL Workbench 5.2.18 (13 April 2010 beta)
A.1.14. Changes in MySQL Workbench 5.2.17 (02 April 2010 beta)
A.1.15. Changes in MySQL Workbench 5.2.16 (17 February 2010 beta)
A.1.16. Changes in MySQL Workbench 5.2.15 (28 January 2010 beta)
A.1.17. Changes in MySQL Workbench 5.2.14 (21 January 2010 beta)
A.1.18. Changes in MySQL Workbench 5.2.13 (Not released beta)
A.1.19. Changes in MySQL Workbench 5.2.12 (Not released beta)
A.1.20. Changes in MySQL Workbench 5.2.11 (18 December 2009 beta)
A.1.21. Changes in MySQL Workbench 5.2.10 (01 December 2009 beta)
A.1.22. Changes in MySQL Workbench 5.2.9 (Internal release only beta)
A.1.23. Changes in MySQL Workbench 5.2.8 (18 November 2009 beta)
A.1.24. Changes in MySQL Workbench 5.2.7 (Internal release only alpha)
A.1.25. Changes in MySQL Workbench 5.2.6 (21 October 2009 alpha)
A.1.26. Changes in MySQL Workbench 5.2.5 (Internal Release Only alpha)
A.1.27. Changes in MySQL Workbench 5.2.4 (07 October 2009 alpha)
A.1.28. Changes in MySQL Workbench 5.2.3 (15 September 2009 alpha)
A.1.29. Changes in MySQL Workbench 5.2.2 (27 July 2009 alpha)
A.1.30. Changes in MySQL Workbench 5.2.1 (22 May 2009 alpha)
A.1.31. Changes in MySQL Workbench 5.2.0 (30 April 2009 alpha)
A.2. Changes in Release 5.1
A.2.1. Changes in MySQL Workbench 5.1.19 (06 September 2010 GA)
A.2.2. Changes in MySQL Workbench 5.1.18 (03 September 2009 GA)
A.2.3. Changes in MySQL Workbench 5.1.17 (14 August 2009 beta)
A.2.4. Changes in MySQL Workbench 5.1.16 (30 June 2009 beta)
A.2.5. Changes in MySQL Workbench 5.1.15 (26 June 2009 beta)
A.2.6. Changes in MySQL Workbench 5.1.14 (19 June 2009 beta)
A.2.7. Changes in MySQL Workbench 5.1.13 (12 June 2009 beta)
A.2.8. Changes in MySQL Workbench 5.1.12 (27 April 2009 beta)
A.2.9. Changes in MySQL Workbench 5.1.11 (Not yet released beta)
A.2.10. Changes in MySQL Workbench 5.1.10 (10 April 2009 beta)
A.2.11. Changes in MySQL Workbench 5.1.9 (Not yet released beta)
A.2.12. Changes in MySQL Workbench 5.1.8 (Not yet released)
A.2.13. Changes in MySQL Workbench 5.1.7 (Not yet released)
A.2.14. Changes in MySQL Workbench 5.1.6 (Not yet released)
A.2.15. Changes in MySQL Workbench 5.1.4 (Not yet released)
A.3. Changes in Release 5.0
A.3.1. Changes in MySQL Workbench 5.0.30 (18 February 2009)
A.3.2. Changes in MySQL Workbench 5.0.29 (12 December 2008)
A.3.3. Changes in MySQL Workbench 5.0.28 (06 December 2008)
A.3.4. Changes in MySQL Workbench 5.0.27 (07 November 2008)
A.3.5. Changes in MySQL Workbench 5.0.26 (16 October 2008)
A.3.6. Changes in MySQL Workbench 5.0.25 (12 September 2008)
A.3.7. Changes in MySQL Workbench 5.0.24 (12 August 2008)
A.3.8. Changes in MySQL Workbench 5.0.23 (25 June 2008)
A.3.9. Changes in MySQL Workbench 5.0.22 (27 May 2008)
A.3.10. Changes in MySQL Workbench 5.0.21 (27 April 2008)
A.3.11. Changes in MySQL Workbench 5.0.20 (26 April 2008)
A.3.12. Changes in MySQL Workbench 5.0.19 (15 April 2008)
A.3.13. Changes in MySQL Workbench 5.0.18rc (not released)
A.3.14. Changes in MySQL Workbench 5.0.17rc (07 April 2008)
A.3.15. Changes in MySQL Workbench 5.0.16rc (26 March 2008)
A.3.16. Changes in MySQL Workbench 5.0.15rc (17 March 2008)
A.3.17. Changes in MySQL Workbench 5.0.14abeta (28 February 2008)
A.3.18. Changes in MySQL Workbench 5.0.14beta (25 February 2008)
B. Third Party Licenses
B.1. .NET Flat TabControl License
B.2. Boost Library License
B.3. cURL (libcurl) License
B.4. Python License

List of Figures

3.1. MySQL Workbench Mac OS X Installation Screen
4.1. Getting Started Tutorial - Home Screen
4.2. Getting Started Tutorial - Specify Host Machine
4.3. Getting Started Tutorial - Database Connection
4.4. Getting Started Tutorial - Connection Test
4.5. Getting Started Tutorial - Operating System
4.6. Getting Started Tutorial - Test Host Settings
4.7. Getting Started Tutorial - Review Settings
4.8. Getting Started Tutorial - Instance Name
4.9. Getting Started Tutorial - Home Screen Instance
4.10. Getting Started Tutorial - Admin Startup
4.11. Getting Started Tutorial - Home Screen
4.12. Getting Started Tutorial - New Schema
4.13. Getting Started Tutorial - Columns
4.14. Getting Started Tutorial - EER Diagram
4.15. Getting Started Tutorial - Manage Connections
4.16. Getting Started Tutorial - Review Script
4.17. Getting Started Tutorial - Edit Table Data
4.18. Getting Started Tutorial - Edit Data
4.19. Getting Started Tutorial - Results
5.1. The Home screen
5.2. The Preferences Dialog Box
6.1. Manage DB Connections - Dialog
6.2. Manage DB Connections - Advanced Tab
6.3. Manage DB Connections - Socket/Pipe Parameters
6.4. Manage DB Connections - SSH Parameters
6.5. SQL Editor
6.6. SQL Editor - Toolbar
6.7. SQL Editor - SQL Query Panel
6.8. SQL Editor - Main Tabsheets
6.9. SQL Editor - Snippets Palette
6.10. SQL Editor - Results Tabsheets
6.11. SQL Editor - Results Tabsheets Navigation Controls
6.12. SQL Editor - Live Editing Tabsheet Navigation Controls
6.13. SQL Editor - Connection Information Palette
6.14. SQL Editor - Default Schema Listbox
6.15. SQL Editor - Schemata Explorer
7.1. The MySQL Model page
7.2. The Find Window
7.3. Roles and Privileges
7.4. Role Editor
7.5. The Model Navigator Palette
7.6. The Vertical Toolbar
7.7. A Table on an EER Diagram
7.8. The Table Editor
7.9. The Columns Tab
7.10. The Indexes Tab
7.11. The Relationship Connector
7.12. The Split Connector
7.13. The Layer Object
7.14. Reverse Engineer Database Wizard
7.15. Connect to DBMS
7.16. Select Schemata
7.17. Fetch Object Info
7.18. Select Objects
7.19. Show Filter
7.20. Progress
7.21. Results
7.22. Message Log
7.23. SQL Export Options
7.24. SQL Object Export Filter
7.25. Review Generated Script
7.26. Options
7.27. Script
7.28. Catalog Validation
7.29. Options
7.30. Select Objects to Forward Engineer
7.31. Review Script
7.32. Set parameters for connecting to a DBMS
7.33. Set parameters for connecting to a DBMS
7.34. Model and Database Differences
7.35. Controlling Synchronization Direction
7.36. Update Model Button
7.37. Ignore Button
7.38. Update Source Button
7.39. Click arrows to change direction of synchronization
7.40. Catalog Sources
7.41. Catalog Diff Report
7.42. Adding Tables to the Canvas
7.43. The Default Schema
7.44. Adding an EER Diagram
7.45. The sakila EER Diagram
8.1. Manage Server Instances Dialog
8.2. Manage Server Instances Dialog
8.3. MySQL Workbench - Admin page
8.4. Administrator - Startup tab
8.5. Administrator - Configuration tab
8.6. Administrator - Accounts tab
8.7. Administrator - Connections tab
8.8. Administrator - Variables tab
8.9. Administrator - Export to Disk
8.10. Administrator - Import from Disk
8.11. Administrator - Advanced Options
8.12. Administrator - Logs tab
9.1. The Workbench Scripting Shell