Arduino Yun: Storing Data in Mysql installed on Linino

I do this:

root@Arduino:~# /usr/bin/python /mnt/sda1/mysql.py 1000 2

:slight_smile: and it was inserted in my db, the values 1000 and 2, id nº 17:

mysql> SELECT * from NossoTeste;
+----+-------+--------+
| id | valor | tensao |
+----+-------+--------+
|  1 |     1 |   NULL |
|  2 |     0 |   0.00 |
|  3 |     0 |   0.00 |
|  4 |     0 |   0.00 |
|  5 |     2 |   4.00 |
|  6 |  NULL |   NULL |
|  7 |  NULL |   NULL |
|  8 |     6 |   4.00 |
|  9 |     0 |   0.00 |
| 10 |     0 |   0.00 |
| 11 |     0 |   0.00 |
| 12 |     0 |   0.00 |
| 13 |     5 |   6.00 |
| 14 |     1 |   4.00 |
| 15 |     4 |   8.00 |
| 16 |     1 |   7.00 |
| 17 |  1000 |   2.00 |
| 18 |  1024 |   4.88 |
+----+-------+--------+
18 rows in set (0.00 sec)

Then In arduino code, i put this:

#include <Process.h>
void setup() {
  // put your setup code here, to run once:
Bridge.begin();
}

void loop() {
  // put your main code here, to run repeatedly:

}
void insertdb() {
  Process p;            
  p.begin("/usr/bin/python /mnt/sda1/mysql.py");      
  p.addParameter("1");  
  p.addParameter("64"); 
  p.run();
  }

But it didn’t work, values 1 and 64 weren’t inserted in my db.

What i'm doing wrong?