arduino yun to MySQL

hi

i am currently doing my projects on the room temperature measurement using arduino yun . So now i needed to create android app for room temperature measurement . My question is how to upload my room temperature reading into MySQL because using MySQL i can able to show my reading in android app.

I would be far easier to have PHP write data to MySQL rather than have the Arduino write to MySQL directly. Libraries exist to access a page from a web server. You could use that to access a page called arduino_record_temp.php?temp=40 on your server. You'd just have to make that page on your web server and have PHP read your data from that URL (from $_GET['temp']) and put it in MySQL.

If you get seriously stuck with the PHP side of things let me know and I'll go into a little more detail.

Example of opening a web page:

john_ks:
hi

i am currently doing my projects on the room temperature measurement using arduino yun . So now i needed to create android app for room temperature measurement . My question is how to upload my room temperature reading into MySQL because using MySQL i can able to show my reading in android app.

@john_ks,
can you give us more details on "show(ing) reading in (the) andriod app"? as BahamutSalad suggests, it is far easier to read directly from the Yun, but perhaps you have some other objective.

TIA
Jesse

The convention MySQL-REST method:

HTTP Client->Web Service (e.g. PHP script)->Web server(e.g. Apache)->Mysql Driver(e.g. mysql,mysqli,pdo)->MySQL

The new HTTP Plugin:

HTTP Client->HTTP Plugin->MySQL

HTTP Plugin is much clean and offer super performance gain.

This s an nice tutorial--in German-- but I think the code is multilingual :wink:

Here is a good tutorial that I am following. Not sure if this is what you want.

Did you by any chance optimize the code for yun? That sure is what i need right now :smiley: