Documentation Home
MySQL and Windows
Related Documentation Download this Excerpt

MySQL and Windows  /  Configuration  /  Global Options

6.3 Global Options

Each operation, such as Import MySQL Data, has its own set of options. This section describes the options that apply to all connections, SQL queries, spatial data, imported tables, and edit sessions.

To configure global options, open an existing connection and then click Options in the MySQL for Excel task pane.

Option buttons include:

  • Accept: Saves option changes to your host and preserves these changes across all sessions and future Excel instances.

  • Reset to Defaults: Resets all option values in the current options window to their default settings. Click Accept to save the changes.

A set of global options affect the entire add-in, as described in the sections that follow.

Connections Tab

The following options apply to all MySQL connections.

Figure 6.4 Global Options: Connections

Global options that apply to MySQL connections

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.

  • Automatic connections migration delayed until: Migration status

    Migrate stored connections to MySQL Workbench now

    You can create new MySQL connections in MySQL for Excel when MySQL Workbench is not installed. As soon as you install MySQL Workbench, MySQL for Excel attempts to migrate the saved connections to merge them with those of MySQL Workbench to enable connection reused in both products. MySQL connections cannot be migrated if MySQL Workbench is open.

    MySQL for Excel prompts you to either migrate the connections automatically, keep the connections stored with MySQL for Excel only, or to delay the migration by:

    • one hour

    • one day

    • one week

    • one month

    • indefinitely

    Delaying by an hour, day, week, or month displays the prompt to migrate again after that time elapses. If you choose to delay the migration indefinitely, you can click Migrate stored connections to MySQL Workbench now to migrate all the new connections from MySQL for Excel to MySQL Workbench manually, as long as MySQL Workbench is installed.

SQL Queries Tab

The following options apply to all SQL queries.

Figure 6.5 Global Options: SQL Queries

Global options that apply to SQL queries

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 Use Optimistic Update option, as demonstrated below:

    Figure 6.6 Optimistic Updates: Configuring at Runtime

    Optimistic Updates: Configuring at Runtime

    This option is selected by default.

  • Do not show SQL statements sent to the server: When the option is selected, SQL statements are not displayed and only their results are displayed in the information dialog. Selected by default.

  • Preview SQL statements before they are sent to the server: When selected, it adds an extra step to the Create New Schema, Export Data, Append Data and Edit Data operations before a statement is committed to the server. It displays the Review SQL Script dialog, as shown below for an export-data operation:

    Figure 6.7 The MySQL for Excel configuration: Preview Option

    The MySQL for Excel configuration: Preview Option

    From here you can modify the SQL statements before they are executed, which also enables the Original Query 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 deselected 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 deselected by default.

Spatial Data Tab

The spatial data option enables you to choose a format for handling the data as text. Use the drop-down list to select a format to apply:

  • Well-Known Text (default)

  • Keyhole Markup Language

  • Geography Markup Language

  • GeoJSON

Figure 6.8 Global Options: Spatial Data

Global options that apply to spatial data

Imported Tables Tab

The following options apply to all imported tables.

Figure 6.9 Global Options: Imported Tables

Global options that apply to imported tables

Imported Tables Options

  • Restore imported MySQL data in Excel Tables when:

    • Opening an Excel workbook: Selected by default.

    • Showing the Add-In's sidebar: Deselected by default.

  • Manage connection information stored in the user settings file: Provides a list of saved Excel files that contain linked MySQL connection information. Clicking this button opens the Manage Import/Export Connection Information dialog.

Edit Sessions Tab

The following options apply to all edit sessions.

Figure 6.10 Global Options: Edit Sessions

The MySQL for Excel configuration: Global Options

Edit Session Options:

  • Preview MySQL table data before an Edit Data session is opened: Selected by default.

  • Restore saved Edit sessions when opening an Excel workbook: Selected by default.

    • Reuse Excel worksheets matching their names with the session table names: Selected by default.

    • Create new Excel worksheets for the restored Edit sessions: Deselected by default.

  • Manage connection information stored in the user settings file: Provides a list of saved Excel files that contain linked MySQL connection information. Clicking this button opens the Manage Import/Export Connection Information dialog.

Manage Import/Edit Connections Information

This dialog lists the connection information for Excel worksheets that are known to MySQL for Excel. From here you can view all saved workbooks that contain worksheets with imported or edited data from MySQL tables and optionally delete the connection information associated with each workbook.

Note

The list of missing information will be empty in most cases because MySQL for Excel manages orphaned connection information for you. If you see items in the Manage Import/Edit Connections Information dialog, it means that you should remove connection information as described in this section.

By default, clicking Accept will delete connection information for missing worksheets, but this behavior is configurable. Additionally, clicking Select connection information entries selects the check box (selects for deletion) of books that you have not accessed for n days, where n defaults to 30.

Figure 6.11 MySQL for Excel: Manage Connection Information

Manage Connections Information Stored

Note

This option was added in MySQL for Excel 1.3.0

Note

The options to automatically delete missing connections, or delete connections not accessed for n days, were added in MySQL for Excel 1.3.4.


User Comments
Sign Up Login You must be logged in to post a comment.