Hello Arduino,
I have a hard time trying to connect the Arduino to MySQL server. Below are the details of the hardware / software used:
Arduino Uno
Cytron ESPWiFi Shield
MySQL (Hosted on local host)
Please find the attached Arduino sketch which was modified from the example "connect_wifi" taken from the MySQL Connector Arduino library. The sketch was modified in order for the Cytron wifi shield to be able to operate because Cytron wifi shield do not work with <Wifi.h> from Arduino.
The screenshot attached shows that the Arduino succesfully connected to the wifi but couldn't connect to the MySQL database.
Hope that someone would be able to help me.
Thank you very much.
test131016.ino (2.67 KB)
Hi Weeshen, welcome to the forum!
It makes it much easier to read if you include your code in the post using the code tags </>
like this
Have you checked that your mysql server is correctly configured and listening (no firewall, configured to listen on all ip addresses etc)? Have you looked in the mysql log files to see if there is any evidence of connection attempts? Harder to be more specific without knowing which OS you are running mysql under.
Have you verified that the examples supplied with the Cytron can compile and run on your system? I always find that is a good starting point.
Hi rw950431,
Thanks for the reply and recommendation. However, I found another alternative to my problem. But thank you very much for the reply.
Cheers,
WeeShen