Excel To MySql : MySql drivers failed to install

mmmarks

Active Member
Joined
Jun 4, 2011
Messages
432
Office Version
  1. 2013
Hi Xcel gurus,

I have a workbook which connecting to Mysql and getting data (In Pivot) no issues.

Plan is to distribute this Workbook to my team so that they can able to see LIVE updates by Mysql.

Issue : while testing, I have given this workbook to one of my team mate, and he is unable to Refresh Pivot table and giving below error.

ODBC Driver Manager Data source name not found and no default driver specified.

Below error comes when Mysql drivers not configured in ODBC-Drivers ( In My system I do have but It's not possible to configure manually in every system so I'm looking for a code which automatically add MySQL Drivers in ODBC and code will execute.

Tried many possibilites.

Code:
Dim oConn As ADODB.Connection
Private Sub ConnectDB()
Set oConn = New ADODB.Connection
Dim str As String
str = "DRIVER={MySQL ODBC 5.3 Unicode Driver};" & _
                                            "SERVER=103.231.8.95;" & _
                                            "PORT=3306" & _
                                            "DATABASE=quality_db;" & _
                                            "UID=root;" & _
                                            "PWD=********;" & _
                                            "Option=3"
''' error '''
oConn.Open str
End Sub

Above code is not installing MySql Drivers

Any help will be highly appreciated.
 
Last edited by a moderator:

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,215,523
Messages
6,125,318
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top