ArcGIS Pro Connect to MySQL database via OLE DB connection

1415
9
04-20-2021 10:02 AM
Labels (2)
KieranClark
Occasional Contributor

I've found some old threads talking about the difficulty connecting to a MySQL and I was wondering if it's even possible to connect to MySQL directly in ArcGIS Pro these days.

I've created a data source on my computer, but when I go to add an OLE DB connection in ArcGIS Pro, I don't even have the option to select the MySQL ODBC driver.

Is there a setting or plugin/addon I'm missing that would let me do this? I would really rather not have to migrate our database to PostgreSQL if I can avoid it.

9 Replies
JoeBorgione
MVP Esteemed Contributor

If you follow this link you'll not see mySql as a supported database.  I have used stand alone python to connect to a mySql db and with arcpy copy various tables into an ArcGIS file geodatabase.

That should just about do it....
0 Kudos
KieranClark
Occasional Contributor

Yeah, I was just hoping there was some sort of workaround. Looks like we'll be moving to PostgreSQL. Not a big deal as there are really good migration tools out there but it would be nice if Esri supported MySQL as well. I feel like it's common enough to warrant compatibility.

0 Kudos
MichaelVolz
Esteemed Contributor

Do you currently connect ArcMap to MySQL via an ODBC connection and you're trying to migrate that workflow to Pro?  Or is this a new setup just in Pro?

0 Kudos
KieranClark
Occasional Contributor

I was actually able to find a way to make this work!

I had completely misunderstood what the Microsoft OLE DB Provider for ODBC Drivers was for. If I choose that option and select the MySQL data source that I made through MySQL's OLE DB connection it all works.

I guess that option is like a wrapper or whatever to allow connections to other types of database. So if you're in my situation and need to connect to a MySQL server, try the "Microsoft OLE DB Provider for ODBC Drivers" option!

JoeBorgione
MVP Esteemed Contributor

Great Tip @KieranClark !  Thanks!

That should just about do it....
0 Kudos
JoeBorgione
MVP Esteemed Contributor

@KieranClark :  I followed your advice as well as post from  @KenGalliher1  and I've established a MySQL connection through ArcGIS Pro (2.7.1) but I get an error when I try to add a table to my ArcGIS Pro session:

JoeBorgione_0-1620235500239.png

I can get to this data base (which is web hosted) using WorkBench without any problem.

Any ideas?

That should just about do it....
0 Kudos
InokaW
by
New Contributor

how can I add OLE DB connection in Arc GIS Pro 2.4 ?? any methods??

0 Kudos
InokaWijekoon
New Contributor

any add-ins or arcpy packages? 

0 Kudos
JoeBorgione
MVP Esteemed Contributor

If anyone is still following this post or comes across it, the problem I describe is now a listed as a bug when connecting to MySql ver8.

BUG-000141014

 

That should just about do it....