Help using Arduino yun to write data to mysql database

Does anyone know of any tutorials on how to go about achieving this? I want to take the data from mysql database and display it on my personal web server using google API charts.

If you have PHP installed on your server, you can use the mysqli interface (if also installed). I do not have a yun, however other people have had PHP running on their boards. There is a yun forum section, have a look in there. Or maybe a mod can move this thread for you.

A quick search on google will probably reveal more. And there is tons of PHP specific info for accessing databases.

Ok just to clarify, u mean installing like a php library on the board and writing a php script that would be executed by the board in order to write to the database?

Exactly. Just like a standard web server.

There may also be other ways to communicate directly with the database using other languages available on the yun.

Ok but i was wondering if was that simple, just to install the php library and write a simple php script and run it on the arduino itself, why are there many people experiencing problems :confused:

I even came across some blog where a guy came up with a sql connector for the arduino but it has some limitations to it and it doesnt seem like a secure method for writing data to the database.

Also I have an alternative but I'm not 100% sure about how valid it is. If write my sensor data to google spread sheets instead of mysql, can I query the data just like a database and use google API charts to display them on my web interface?

kreiss12:
why are there many people experiencing problems :confused:

I even came across some blog where a guy came up with a sql connector for the arduino but it has some limitations to it and it doesnt seem like a secure method for writing data to the database.

Chuck's Blog: Introducing MySQL Connector/Arduino

It looks like that library is for MySQL access directly from an Arduino sketch using an Ethernet shield. That is more complicated because of the limited program and data space available to an Arduino sketch, and the lack of native networking.

The Yun is very different than a standard Arduino, because it also has the AR3391 processor running Linux. It has the native networking support, it can run MySQL directly, it can serve web pages and run PHP scripts, and it generally has a much higher level of capability compared to an Arduino processor and sketch. All of this lets you use the more direct PHP access method.

I use sqlite and it works fine. Tutorial here http://yunadventures.blogspot.co.uk/

@mikeruss, Mike when posting a link you can help by adding a live link with the (chain) ICON.
OR you can type in

[url={your-url}]{your-url_or_text}[/url]

BTW, thanks for the link.

TIA
Jesse