MySQL Office

How do I connect to MySQL using ODBC driver?3 min read

You can use Microsoft Excel to access data from a MySQL database using ODBC connector. With ODBC Driver, you can import the data directly into an Excel Spreadsheet and present it as a table. Make sure that you use matching Excel and ODBC Driver, e.g. if you have installed a 64-bit ODBC Drive, you will need to use the 64-bit version of Excel.

MySQL ODBC Connector Download

ODBC Configure




You can use Get & Transform (Power Query) to connect to MySQL from Excel with ODBC. This method assumes that you’ve installed an ODBC driver for MySQL.

MySQL ODBC Data Source 64bit

Connecting Excel to MySQL with Get & Transform (Power Query)

Step 1: Click the Data in Excel, then expand the Get Data drop-down list. Click From Other Sources > From ODBC.

Step 2: In the From ODBC dialog, choose your data source name (DSN). If you haven’t configured your ODBC driver yet, you can expand the Advanced Options dialog box and enter the connection string for your data source (without credentials, which are defined in the credentials dialog box in the next step). Additionally, you can enter an SQL statement that will be executed right after establishing a connection to the data source. Click OK.

Step 3: If you’re using a database username or password, select Database and enter your credentials in the dialox bog, then click Connect.

Step 4: In the window that appears, select the table you want to retrieve data from, and click Load.

The data from the table will be a displayed in an Excel spreadsheet where you can further work with it.

Source: https://www.devart.com/odbc/mysql/docs/excel.htm

Leave a Comment