Table of Contents
This section is divided into two overlapping topics; configuring the global options, and managing the MySQL connections.
Each action, such as Import MySQL Data, has its own set of options. The buttons on these pages include:
Actions include:
Clicking : Saves option changes to your host, and preserves these changes across all sessions and future Excel instances.
Clicking : Resets all option values on the current options window to their default settings. Click to save the changes.
A set of "global" options affect the entire plugin, as described here:
Connection Options:
Wait [ ] seconds for a connection to the server before timing out. Defaults to 15.
Wait [ ] seconds for a database query to execute before timing out. Defaults to 60.
SQL Queries Options:
[ ] Use optimistic updates on all Edit Data sessions. This option helps prevent unintentional data overwrite, in that it checks for external edits before committing your changes. For example, between the time you loaded the data into Excel, made changes in Excel, and committed, a different user could have edited the same cells elsewhere in MySQL using MySQL Workbench or some other means. The optimistic updates feature checks for these changes, and notifies you accordingly.
Optimistic updates can also be configured at runtime for all Edit Sessions, or for a specific edit session by right-clicking the Edit Session floating dialog and choosing the desired option, as demonstrated below:
This option is enabled by default.
( ) Do not show SQL statements sent to the server: When enabled, SQL statements are now displayed, and only their results are displayed in the information dialog. Enabled by default.
( ) Preview SQL statements before they are sent to the server: When enabled, it adds an extra step to the Create Schema, Export Data, Append Data and Edit Data operations before a statement is committed to the server. It enables the "Review SQL Script" dialog, as shown below for an "Export Data" operation:
From here you can modify the SQL statements before they are executed, which also enables the button. If clicked, it will revert all modifications to the script to restore the SQL to its original form (when the dialog was first opened).
This option is disabled by default.
( ) Show executed SQL statements along with their results: When enabled, SQL statements are first executed and then the information dialog includes both the results and the executed statements. This is helpful when reviewing the recently executed queries when comparing the results.
This option is disabled by default.
Edit Session Options:
[ ] Restore saved Edit sessions when opening an Excel workbook. Enabled by default.
( ) Reuse Excel worksheets matching their names with the session table names. Enabled by default.
( ) Create new Excel worksheets for the restored Edit sessions. Disabled by default.
: See a list of saved Excel files with linked MySQL connections.
This lists the connected Excel worksheets that are known to MySQL for Excel. From here you can view these connections, and optionally delete them. By default, clicking will delete connections to missing worksheets but this behavior is configurable. Additionally, clicking the Select connection information entries link checks (selects for deletion) books that you have not accessed for n days, where n defaults to 30.
This option was added in MySQL for Excel 1.3.0
The options to automatically delete missing connections, or delete connections not accessed for n days, were added in MySQL for Excel 1.3.4.
For additional information about managing MySQL connections using MySQL for Excel, see Section 3.2, “Managing MySQL Connections”.
Select a MySQL connection and then click Create New Schema from the MySQL for Excel toolbar to add a new and empty MySQL schema.
MySQL for Excel shares its MySQL connections with MySQL Workbench, although it is optional to have MySQL Workbench installed. Creating and editing MySQL connections in either application will edit the MySQL connection information for both applications.
You can use MySQL for Excel or MySQL Workbench to add new MySQL connections.
From Excel, click New Connection to open the new connection dialog as demonstrated in the following partially filled screenshot:
Fill out the connection details, click to confirm the MySQL connection is valid, and click to save the new connection.
To edit a MySQL connection, right-click the connection you want to modify and select from the context menu, like so:
The MySQL connection edit dialog is similar to the edit dialog in MySQL Workbench. Configure the changes and click to save your changes:
Optionally, you can edit your MySQL for Excel MySQL connections using MySQL Workbench. To do this, open MySQL Workbench, edit a MySQL connection, and then refresh the connection list in MySQL for Excel.
For information about editing MySQL connections in MySQL Workbench, see the MySQL Workbench documentation titled MySQL Connections.
MySQL connections can be deleted from MySQL for Excel or MySQL Workbench.
MySQL connections cannot be deleted if MySQL Workbench is open. To remove connections, you must first close MySQL Workbench.
To delete an edit or import connection from MySQL for Excel to a particular Excel worksheet, click , , check the desired worksheets, and then click to execute the delete action.