MySQL connector with ESP8266

Hello, is it possible to use the MySQL Connector library ( which is primarily designed for Ethernet and WiFi shields) with ESP8266 for accessing MySQL database on a computer .
Computer and ESP are in the same network .

I haven't tried it, but it should be possible in theory. The MySQL examples have

EthernetClient client;
  • both EthernetClient and WiFiClient derive from the same Client class , so you should just be able to replace EthernetClient with WiFiClient in the MySQL examples.

I didn't know such a library existed! Could be useful to me as well so thanks! I'll try it later, and let you know how I go on if you can't make it work.

(later...)
just downloaded the manual and seems it will only work with wifi shields on a 'standard' Arduino. You could message the author and ask how it might be done with esp8266.

Thanks you :slight_smile: i will surely do that

Buenos dias...

alguien ha logrado hacer el ESP8266 conectar a la base de datos MYSQL utilizando la libraría MYSQL_Connector?

Todavía no he encontrado la solución...

Gracias :slight_smile:

Working great on an ESP8266.

ESP connects over WiFi to the local router, to the Internet, to my MySQL server running on my cloud server. Should work the same on a local network.

wvmarle:
Working great on an ESP8266.

ESP connects over WiFi to the local router, to the Internet, to my MySQL server running on my cloud server. Should work the same on a local network.

Hello! I realise this is a really old post but any chance you can share your code? I'm banging my head against a wall here trying to work it out haha

You may find something in old revisions of GitHub - wvmarle/HydroMonitor: Monitor your hydroponic growing system from the comfort of your chair! but I'm sure you're much better off looking at the many example sketches that are included with the library itself. I've stopped using it.