Arduino Yun And Mysql insert data!

Hi,
I need to send over the bridge a line to add a row of data to a mysql database. In the prompt of putty I tried to put the following command line:

mysql-h localhost-u root-proot -meteo -e "INSERT INTO Storico VALUES ('06 ', ‘2012-08-21’, ‘21: 30:00 ‘,’ Lunedì’, ‘98000’, '23 ', '50 ', ‘25’, '45 ', ‘2’, ‘ciao’);

and work!
but if i use the following sketch :

Process insertdata;
insertdata.begin("mysql");
insertdata.addParameter("-h");
insertdata.addParameter("localhost");
insertdata.addParameter("-u");
insertdata.addParameter("root");
insertdata.addParameter("-proot");
insertdata.addParameter("meteo");
insertdata.addParameter("-e");
insertdata.addParameter("\"INSERT");
insertdata.addParameter("INTO");
insertdata.addParameter("Storico");
insertdata.addParameter("VALUES('06','2012-08-21','21:30:00','Lunedì','98000','23','50','25','45','2','ciao');\"");
insertdata.run();

or also :

p.runShellCommand("mysql -h localhost -u root -proot meteo -e \"INSERT INTO Storico VALUES('08','2012-08-21','21:30:00','Lunedì','98000','23','50','25','45','2','ciao');\"");

does’t work! Any idea?
p.s. i can’t use a pyton script o php! <-Modified

Lua,Python,Shellscript,Php SQL communications.

I'm sorry for the mistake I mean I can not use pyton or php! :sweat_smile: :sweat_smile: :sweat_smile:

Stefanodal74:

insertdata.addParameter("\"INSERT");

insertdata.addParameter("INTO");
insertdata.addParameter("Storico");
insertdata.addParameter("VALUES('06','2012-08-21','21:30:00','Lunedì','98000','23','50','25','45','2','ciao');"");

Your SQL query should all be one parameter.

insertdata.addParameter("\"INSERT INTO Storico VALUES('06','2012-08-21','21:30:00','Lunedì','98000','23','50','25','45','2','ciao');\"");