The data connection you just created should be listed: You should now be back at the Workbook Connection window. Next, click on the Finish button in the lower right of the window. The description used in the example is pretty self explanatory for anyone that might use it. The file name field should be auto filled for you. The next step in the Data Connection Wizard is to save and finish. Hopefully, if all as gone according to plan, you should see the DSN that you created in previous steps listed among the ODBC data sources. The next step of the Data Connection Wizard will display all of the ODBC data sources available on the system you are using. Given the data source choices listed, you want to highlight ODBC DSN and click Next. In doing so, you should be now see the Data Connection Wizard window: Therefore, you want to double click on the +Connect to New Data Source.odc folder. Just like the previous Existing Connections window, you do not want to use the connections listed in the Select Data Source window. This will present you with the Select Data Source window: Therefore, click on the Browse for More… button. Obviously you don’t want to work on any of the connections listed. This will present you with the Existing Connections window: The next step is to click on the Add button. You should be presented with the Workbook Connections window: The location of the Connections link is circled in red in the above image. The next step is to click on the Connections link located right under the word Data in the tab list. Firstly, you should see something like this: In older versions of Excel, it’s a bit more of a process. For newer versions of Excel, click on Get Data, then From Other Sources, then From ODBC. Once you have opened Excel, click on the Data ribbon. Now that you have successfully created a new DSN, you can close the ODBC Data Source Administrator window and open Excel. You should now see the data source name you supplied on the form in the previous set listed on the ODBC Data Source Administrator window:
In the future, you can grant additional privileges if necessary.Īfter you have supplied the details for your data source configuration, you should click on the Test button to make sure everything is in working order. For “production” environments, it is suggested you create a new user and grant the new user SELECT privileges only.
The MySQL database and table we’re using for this post is on a development machine and is only used by one person. Next you will need to supply the information necessary to complete the form shown above. You should now see a window similar to the one listed below:
#Excel connect to mysql run query driver#
To continue creating the DSN, make sure MySQL ODBC 5.x Driver is highlighted and click on the Finish button. If it’s not present, something went wrong with installing the driver in the Preparation section of this post. You will probably have to scroll down to see the MySQL ODBC 5.x Driver. To continue creating the DSN, click on the Add button near the top right corner.
#Excel connect to mysql run query drivers#
DSN file that can be transported to and used on other systems that have the same OS and drivers installed. A System DSN is available to anyone that can log into the machine. A User DSN is only available to the user that created it.