How can I connect an Arduino / ESP8266 to an Azure MySQL database? I am currently trying to connect an ESP8266 to my Azure MySQL database via WiFi, but have not yet been successful.

I have tried a bunch of guides, but no luck and I'm running out of ideas. I have made a connection to an IoT Hub in Azure but could not forward the messages to the MySQL database in the cloud. I managed to get it stored in a blob datatype but had so many issues with it that I kinda scratched that idea.

Last thing I tried was trying to implement the example from 
https://github.com/ChuckBell/MySQL_Connector_Arduino
more specifically the 'connect_wifi' example. I was unable to find the ip of my azure server so i tried using some of the code from the 'connect_by_hostname' but no luck there.

I'm new to Arduino and cloud in general so any help is appreciated.
Not sure how you would directly connect with an C++ embedded file. One way you could achieve this is by creating a computer application and connect to the machine via Bluetooth.

{Arduino}
* Intake information
* Process into commands
* Push through software serial ----(Blue Tooth-----&gt; { PC or MAC}
                                                    *Create C# or Swift App
                                                    *Intake information via COM-PORT
                                                    *Prepare SQL command with serial data
                                                    *Push to database server


This may of not of been the method you were looking for, but it's a way I found around the issue when working with Azure Databases and Arduino Micro-Controllers. An alternative is going to Raspberry Pi which has a little more resources to deal with server functions.

Hope this helps.