Go Down

Topic: Trouble connecting to MySQL using "MySQL Connector Arduino" library (Read 90 times) previous topic - next topic


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.


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 </>

Code: [Select]
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.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131