6.4.2 Importing MySQL Data to Access

To import tables from MySQL to Access, follow these instructions:

  1. Open the Access database into which that you want to import MySQL data.

  2. On the External Data tab, choose ODBC Database.

    External Data-ODBC Database
  3. In the Get External Data dialog box that appears, choose Import the source data into a new table in the current database and click OK.

    Get External Data-ODBC Database

  4. 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 from which you want to import your table. To define a new DSN for Connector/ODBC instead, click New and follow the instructions in Section 5.3, “Configuring a Connector/ODBC DSN on Windows”; double click the new DSN after it has been created.

    Selecting an ODBC Database

    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.

  5. Microsoft Access connects to the MySQL server and displays the list of tables that you can import. Select the tables you want to import (or click Select All), and then click OK.

    Selecting Tables to Import
    Notes
    • If no tables show up for you to select, it might be because 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.3, “Configuring a Connector/ODBC DSN on Windows” for details), or choose a Database when you log in to the DSN .

    • If your Access database already has a table with the same name as the one you are importing, Access will append a number to the name of the imported table.

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

    Selecting an ODBC Database