Documentation Home
MySQL and Windows
Related Documentation Download this Excerpt

MySQL and Windows  /  ...  /  MySQL Connections in Excel

6.3.1 MySQL Connections in Excel

MySQL for Excel provides several options to create and manage MySQL connections. You must open a connection to a MySQL server before you can configure global options, add a new schema, or perform operations that move data between Excel worksheets and MySQL tables. As the following figure shows, the MySQL for Excel task pane displays connection actions by default when it opens.

Figure 6.2 MySQL for Excel: MySQL Connections

Content is described in the surrounding text.

Description of MySQL for Excel Connection Elements

  1. Open a MySQL Connection lists the existing local and remote MySQL server connections. When you install MySQL for Excel, it creates a local connection automatically for each local MySQL server instance that you have configured on the system. After the initial installation, you can add new local or remote connections to the list.

    Double-click a connection from the list to open it. The MySQL server associated with the connection must be started on the local or remote host before you can open the connection. Select a schema to view and then click Next. Click Back to return to the list of schemas.

    Right-click an existing connection in the list to delete, edit, or refresh it.

  2. New Connection opens a connection dialog in which you can define and test a new connection. For instructions, see Adding MySQL Connections.

  3. Manage Connections launches MySQL Workbench if it is installed on the local host.

    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.

Adding New MySQL Connections

You can use MySQL for Excel or MySQL Workbench to add new MySQL connections. Adding new connections is not permitted when MySQL Workbench is open.

To add a new connection, click New Connection in the MySQL for Excel task pane to open the MySQL Server Connection dialog. Connection names must be unique. An asterisk character (*) indicates a required field. The figure that follows shows the connection dialog with the Parameters tab displayed.

Figure 6.3 MySQL for Excel: Add a New MySQL Connection Dialog

Content is described in the surrounding text.

Fill out the connection details, click Test Connection to confirm the MySQL connection is valid, and click OK to save the new connection.

Editing MySQL Connections

You can use MySQL for Excel or MySQL Workbench to edit existing MySQL connections.

  • Editing MySQL Connections in MySQL for Excel

    To edit a MySQL connection, right-click the connection you want to modify and select Edit Connection from the context menu.

    The MySQL connection edit dialog is similar to the edit dialog in MySQL Workbench. Configure the changes and click OK to save your changes.

  • Editing MySQL Connections in MySQL Workbench

    Alternatively, 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 Connections in MySQL Workbench.