Documentation Home
Connectors and APIs Manual
Download this Manual
PDF (US Ltr) - 4.5Mb
PDF (A4) - 4.5Mb


5.6.4.1 Exporting Access Data to MySQL

Important

Make sure that the information that you are exporting to the MySQL table is valid for the corresponding MySQL data types. Values that are valid within Access but are outside of the supported ranges of the MySQL data types may trigger an overflow error during the export.

To export a table of data from an Access database to MySQL, follow these instructions:

  1. With an Access database opened, the navigation plane on the right should display, among other things, all the tables in the database that are available for export (if that is not the case, adjust the navigation plane's display settings). Right click on the table you want to export, and in the menu that appears, choose Export , ODBC Database.

    Figure 5.13 Access: Export ODBC Database Menu Selected

    Content is described in the surrounding text.

  2. The Export dialog box appears. Enter the desired name for the table after its import into the MySQL server, and click OK.

    Figure 5.14 Entering Name For Table To Be Exported

    Example Export dialog shows a table named "Cats" entered and ready to be exported.

  3. The Select Data Source dialog box appears; it lists the defined data sources for any ODBC drivers installed on your computer. Click either the File Data Source or Machine Data Source tab, and then double-click the Connector/ODBC DSN to which you want to export your table. To define a new DSN for Connector/ODBC instead, click New and follow the instructions in Section 5.5.3, “Configuring a Connector/ODBC DSN on Windows”; double click the new DSN after it has been created.

    Figure 5.15 Selecting An ODBC Database

    Shows the Select Data Source dialog with the "Machine Data Source" tab active and an example Data Source Name "MySQL 5.7" selected.

    If the ODBC data source that you selected requires you to log in, enter your login ID and password (additional information might also be required), and then click OK.

  4. A dialog box appears with a success message if the export is successful. In the dialog box, you can choose to save the export steps for easy repetitions in the future.

    Figure 5.16 Save Export Success Message

    Content is described in the surrounding text.

    Note

    If you see the following error message instead when you try to export to the Connector/ODBC DSN, it means you did not choose the Database to connect to when you defined or logged in to the DSN. Reconfigure the DSN and specify the Database to connect to (see Section 5.5.3, “Configuring a Connector/ODBC DSN on Windows” for details), or choose a Database when you log in to the DSN .

    Figure 5.17 Error Message Dialog: Database Not Selected

    Shows the error described in the surrounding text of this figure for the error containing the text "ODBC -- call failed" and "No database selected".