Hi,
Please help I am so New in Arduino
I trying to make small connection sample project
to connect MySQL database via arduino
here is my code
#include <SPI.h>
#include <Ethernet.h>
#include <sha1.h>
#include <mysql.h>
IPAddress server_addr(172,16,1,204);//database IP
char user[] = "user";
char password[] = "password";
byte mac_addr[] = { 0x00, 0x01, 0x80, 0x77, 0x72, 0x24 };
Connector my_conn;
char INSERT_SQL[] ="INSERT INTO test_nesreen.ard(x,y,z) VALUES ('Hello','MySQL!','NULL')";
void setup() {
Ethernet.begin(mac_addr);
Serial.begin(115200);
delay(1000);
Serial.println("Connecting...");
if (my_conn.mysql_connect(server_addr, 3306, user, password))
{
delay(500);
my_conn.cmd_query(INSERT_SQL);
Serial.println("Query Success!");
}
else
Serial.println("Connection failed.");
}
void loop() {}
I try to run this code via proteus simulator
but database receive nothing
So please help me
what is wrong with my sample code ?