I'm using the official Ethernet Shield to insert rows into a MySQL table every 5 or 10 sec. I've been successful by modifying one of the ClientConnect example in the Ethernet Library to connect to a php script with the variables in the URL. The PHP parses the variables and handles the MySQL insertion.
Is there a cleaner/faster way to get the job done by connecting directly to the MySQL server?
I'm using the arudino to insert data into a MySQL table as well, but I too am going through a PHP script. I do it because it acts as a security layer for my db. Mysql databases are normally set up to work with a local IP. You can make the MYSQL DB accept different IPs as well. But if you move (eg. your computer is a laptop) or have dynamic IPs or other people use your product to write to your server, you will have to keep adding IPs to the MySQL DB.
That's exactly what I want to do, write to a MYSQL DB.
Different Arduinos with Sensors should write theire data
to an DB...
Can someone explain me how to set this up? Or give me
some tips?
coffeeguru: Could you post the code that you are using to call your PHP page? I'm interested in doing something similar to this, but I only want to update the data in my MySQL DB when a switch is pressed. I would eventually like to display a response from the PHP on an LCD on the Arduino as well.