How to Connect Excel to MySQL in 2026 (Power Query + ODBC)

·
7 min read

Help Desk Geek is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

Pulling MySQL data into Excel still works great in 2026, but the old method most tutorials describe (MySQL for Excel add-in) was discontinued in 2019 and is unreliable on modern Office 365 and Office 2021+. The reliable path now is Power Query + MySQL ODBC 9.0, and it’s actually easier than the old way.

What You Need Before You Start

  • Excel 365 or Excel 2021 (64-bit; check via File > Account > About Excel)
  • MySQL Connector/ODBC 9.0 (64-bit). download from MySQL’s official page
  • Your MySQL server hostname, database name, username, and password
  • Port 3306 open between your machine and the MySQL server

Skip MySQL for Excel. Oracle’s official add-in (last updated 2019) is discontinued and unreliable on modern Office 365 and Office 2021+ setups. Power Query handles the same job natively and more reliably.

Step 1: Install MySQL ODBC 9.0

  1. Go to dev.mysql.com/downloads/connector/odbc/ and download the 64-bit Windows MSI installer for MySQL Connector/ODBC 9.0.0.
  2. Run the installer and follow the prompts. Accept the default installation path.
  3. When the installer finishes, you don’t need to restart. The driver is immediately available to Windows.

Compatibility note: MySQL Connector/ODBC 9.0 supports MySQL 8.0 and 8.4 (Community and Enterprise editions), as well as common managed services including Azure Database for MySQL and AWS RDS for MySQL. For exact version compatibility details, check the official MySQL Connector/ODBC release notes before installing.

MySQL Connector/ODBC 9.0 installer completion screen on Windows 11

Step 2: Create a System DSN in ODBC Data Source Administrator

A DSN (Data Source Name) stores your connection details so Excel can find your MySQL server without you retyping credentials every time.

  1. Press Windows + S, type ODBC, and open ODBC Data Sources (64-bit). Make sure you open the 64-bit version, as the 32-bit one won’t work with Excel 365.
Windows 11 search results showing "ODBC Data Sources (64-bit)" highlighted in the Start menu
  1. Click the System DSN tab, then click Add.
ODBC Data Source Administrator window on Windows 11 with System DSN tab selected and Add button visible
  1. Scroll down the driver list and select MySQL ODBC 9.0 Unicode Driver, then click Finish.
Create New Data Source dialog with "MySQL ODBC 9.0 Unicode Driver" highlighted in the driver list
  1. Fill in the MySQL Connector/ODBC configuration form:
    • Data Source Name: Something descriptive, like MyMySQLDB
    • Server: Your MySQL hostname (e.g., localhost or myserver.mysql.database.azure.com)
    • Port: 3306
    • User: Your MySQL username
    • Password: Your MySQL password
    • Database: Select your target database from the dropdown (it will populate after credentials are entered)
MySQL ODBC 9.0 Connector configuration dialog with Data Source Name, Server, Port, User, and Database fields filled in
  1. Click Test. You should see a “Connection successful” message. If you get an SSL error, see the Azure/SSL note below.
  2. Click OK to save the DSN. It will now appear in the System DSN list.

Editing or removing a DSN later: If your credentials, hostname, or SSL settings change, you don’t need to start over. Reopen ODBC Data Sources (64-bit), select your DSN on the System DSN tab, and click Configure to update it or Remove to delete it entirely.

ODBC Data Source Administrator showing the newly created MySQL DSN listed under the System DSN tab

Azure MySQL or SSL Required? Add This to Your Connection

If your MySQL server enforces SSL (Azure MySQL Flexible Server does this by default), the test will fail without SSL mode set. In the ODBC configuration dialog, click the SSL tab and set SSL Mode to REQUIRED. For Azure, your connection details will look like this:

  • Server: myserver.mysql.database.azure.com
  • User: username@myserver
  • SSL Mode: REQUIRED

Step 3: Import MySQL Data into Excel via Power Query

Note: Some Excel builds (particularly older Office 365 versions) expose a Get Data > From Database > From MySQL Database connector directly in the ribbon. If you see that option and it works with your setup, you can use it — it skips the ODBC step. However, the ODBC approach described here is more universal and future-proof, as Microsoft has been phasing out the dedicated MySQL connector in favor of the generic ODBC path.

  1. Open Excel and click the Data tab on the ribbon.
  2. Click Get Data > From Other Sources > From ODBC.
Excel 365 Data tab with Get Data > From Other Sources > From ODBC menu path highlighted
  1. In the From ODBC dialog, open the Data source name (DSN) dropdown and select the DSN you created in Step 2 (e.g., MyMySQLDB). Click OK.
Excel "From ODBC" dialog with DSN dropdown showing the MySQL DSN selected
  1. When prompted for credentials, select Database from the left panel and enter your MySQL username and password. Click Connect.
Excel Power Query credential dialog with "Database" option selected and username/password fields visible
  1. The Navigator pane opens and shows all tables in your MySQL database. Select the table (or tables) you want to import. A preview of the data appears on the right.
Power Query Navigator pane showing MySQL database tables in the left panel with a data preview on the right
  1. Click Load to import the data directly into your spreadsheet, or click Transform Data to open Power Query Editor first (useful if you want to filter rows or rename columns before loading).
Power Query Navigator with Load and Transform Data buttons visible at the bottom

Your MySQL table data will appear in the spreadsheet as a formatted Excel table, with column headers in the first row. You can sort and filter using the dropdown arrows on each column header.

Excel spreadsheet showing imported MySQL table data as a formatted Excel table with column headers and filter dropdowns

Step 4: Refresh the Data Later

The connection is live, so you don’t need to redo this process every time your MySQL data changes.

  1. Click anywhere inside the imported data table.
  2. Go to Data > Refresh All (or right-click the table and select Refresh).

Excel will reconnect to MySQL and pull the latest data. To set an automatic refresh schedule, go to Data > Queries & Connections, right-click your query, select Properties, and enable Refresh every X minutes.

Excel Connection Properties dialog with "Refresh every" checkbox enabled and interval set

Troubleshooting Common Connection Errors

Fix #1: “SSPI call failed” or authentication error

This happens when Windows tries to use Windows authentication instead of database credentials.

  1. In the Power Query credential dialog, make sure you selected Database (not Windows) from the left panel.
  2. Enter your MySQL username and password explicitly. Don’t leave either field blank.
  3. If the error persists, open the ODBC Data Source Administrator, edit your DSN, and confirm the username is entered directly in the configuration form.

Fix #2: SSL certificate error (Azure MySQL)

Note: SSL certificate requirements vary depending on your Azure MySQL deployment type (Flexible Server vs. Single Server) and when your server was provisioned. Always check your server’s Connection Security page in the Azure portal for the current recommended certificate — Microsoft has updated its certificate chain guidance over time, and the correct CA file for your setup may differ from older tutorials.

  1. In the Azure portal, navigate to your MySQL server’s Connection Security page and download the SSL certificate currently recommended for your deployment.
  2. Save it somewhere accessible, like C:\certs\mysql-ca.pem.
  3. Open the ODBC Data Source Administrator, edit your MySQL DSN, go to the SSL tab, and set the SSL Certificate Authority path to that file.
  4. Re-test the connection.

Fix #3: 64-bit mismatch, driver not appearing in Excel

  1. In Excel, go to File > Account > About Excel and confirm it says 64-bit.
  2. Confirm you installed the 64-bit MySQL ODBC driver (not the 32-bit version).
  3. Make sure you’re opening ODBC Data Sources (64-bit), not the 32-bit version, when creating your DSN.

Fix #4: Can’t reach the MySQL server at all

  1. Press Windows + R, type cmd, and press Enter.
  2. Run: telnet yourserver 3306 if it times out, port 3306 is blocked.
  3. For Azure MySQL, check the Firewall rules in the Azure portal under your MySQL server’s Connection Security and add your current IP address.
  4. For local MySQL, check that the MySQL service is running and that your firewall allows outbound connections from excel.exe on port 3306.

Alternative Methods (When to Use Each)

MethodBest ForCostDifficulty
Power Query + MySQL ODBC 9.0Most users, local or cloud MySQLFreeEasy
CoefficientReal-time sync, no IT involvement$49+/mo (as of 2026)Very easy
CData Connect CloudEnterprise, SOC2 compliance neededPaidEasy
SkyviaScheduled ETL, no-code$15+/mo (as of 2026)Easy
VBA + ADODBAutomation, legacy macrosFreeHard
MySQL for Excel❌ Discontinued, don’t useN/A (discontinued)N/A (discontinued)

VBA Connection (For Automation)

If you need to pull MySQL data into Excel as part of a macro or automated workflow, ADODB still works well in 2026. Paste this into a module in the VBA editor (Alt + F11):

Sub ConnectMySQL()
    Dim conn As Object
    Set conn = CreateObject("ADODB.Connection")
    conn.Open "DRIVER={MySQL ODBC 9.0 Unicode Driver};SERVER=localhost;DATABASE=mydb;UID=user;PWD=pass;SslMode=Required;"
    ' Use conn.Execute "SELECT * FROM tablename" to run queries
End Sub

Replace localhost, mydb, user, and pass with your actual connection details. For Azure MySQL, replace SERVER=localhost with your full Azure hostname and add UID=user@servername.

Conclusion

Power Query + MySQL ODBC 9.0 is the solid, free path that works for the vast majority of setups in 2026, whether you’re using local MySQL, Azure, or AWS RDS. The 64-bit mismatch (Fix #3) is the most common stumbling block, so verify your Excel and driver architecture match before anything else. If you need automatic scheduled refreshes without maintaining a DSN, Coefficient is worth trying, though Power Query’s built-in refresh handles most use cases without spending a cent.