Connect to MySQL from Excel

from the Artful MySQL Tips List


1. Install Connector/ODBC.

2. Add a datasource: Run the ODBC Admin tool from Control Panel | Administrative Tools, click on Add, select the MySQL ODBC driver from the driver list, enter the connection parameters you usually use for connecting to the server from the mysql client, test, and click OK.

3. In Excel: In the main menu click Data->Import External Data->Import Data. In the dialog, click the New Source button towards the bottom then double click ODBC DSN. You should now see the datasource you setup in the prior section. Double click this. Select the table you want from the query editor, hit Next->Finish, which brings back to the “Select Datasource” dialog again. Click Open now and specify where to put the table data.



Return to the Artful MySQL Tips page