Arduino ethernet to mySQL


I have a microphone that is printing a value to the serial monitor.

I want these values to be sent to an SQL database every one a minute, then use php to dynamically display it on a webpage.

My understanding so far is that i should use php to put the value into SQL, then use a separate PHP script to put it on the website.

My question is, do i use 2 different coding softwares simultaneously?

Should i send the data to an SQL database via PHP, in the arduino software

Then using Coda 2, can i then take the data from the database and put it on the website?

I don't want host the website on my arduino because it will lag. If i did all the code in arduino, would this would mean the arduino was hosting the website?

Yes, you don't want to host the website on your ardino. So you have a wbserver and a MySQL backend, and that's a standard webapp.

To get the data into mysql from the arduiono, you have a kajillion options. The two most obvious ones are:

1 - as part of your webapp, have REST url where data can be inserted into the database. If you already know php, this is probably the easiest method

2 - add an HTTP plugin to mySql and send INSERT statements. With that plugin, you could probably ditch the webserver altogether and do it all in MySQL stored procedures. Use MySQL itself as the webserver.

In any case, this isn't an arduino problem. You are writing something that accepts connectyions, puts data in a database, and spits out webpages. The fact that the thing that's giving it this data is an arduino is irrelevant.

My question is, do i use 2 different coding softwares simultaneously?

The Arduino will be calling one script. The client (browser) will be calling another. The two scripts may execute on the server at the same time, or not. The Arduino does NOT care what the hell happens on some other machine somewhere else.