MySQL

Hello, I made a projecto with Arduino Uno to control when people enter in my gym, Im using a NFC sensor (as you can ser in the picture) to control ir, I can send all Im using but I dont think thats relevant.
When people pass the card it should add a new entrance in MySQL Database (phpmyadmin) and then appear in the computer, thats actually happening but Im using another program called processing, plus the Arduino program. The problem is, that program and the refresh rate that I have to use in the webpage (JavaScript+HTML+PHP) is making the computer super slow and almost impossible to use, is there anyway to use the Arduino program to add directly to a Database or send something to refresh a webpage? Any ideas are welcome, even if you have any idea on what to Change in the processing program or Java/PHP/HTML etc (if I cant ask about this here sorry)

Also sorry for my English and thanks in advance

mysql connector

One can use http post and get thingies

I prefer for the MCU not have direct access to the Internet. All my remote ESP32's use MQTT to send and receive information from a MQTT Broker running on a RPi. The RPi is the unit that communicates with the MySQl dB and the ESP32's

Thanks, going to try it!
I dont know how I doente saw this library, looked up so much for something like this :confused:

triplep:
Thanks, going to try it!
I dont know how I doente saw this library, looked up so much for something like this :confused:

You will have to edit the configuration of the MySQL server to allow remote connections with the mysql connector.

I already changed the remote connection on mysql (like this one https://www.ovipanel.in/tutorials/database/how-to-enable-remote-connection-to-a-mysql-database-on-phpmyadmin) and changed this part in the arduino basic_insert
IPAddress server_addr(127,0,0,1); // IP of the MySQL server here
char user[] = "root"; // MySQL user login username
char password[] = ""; // MySQL user login password

// Sample query
char INSERT_SQL[] = "INSERT INTO entradas.entrou (numero) VALUES ('1')";.

Is there anything missing? Sorry for so many questions

Not being familiar with the code, the web site, the database, and a few other things that you have done, I do not know if your code is missing anything.

BTW, please use code tags.


As a note, I do not use the MySQl connector. I do not allow my ESP32's access to the internet.

Im using Arduino Uno not esp32, makes any difference?

I do not know.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.