Send Data From ESP to MySQL Database! Updated 2019 | 100% working.
HTML-код
- Опубликовано: 29 июл 2019
- Hello, in this video you will learn how to send data from ESP to MySQL Database. In this video isn't included Wamp64 installation, if you want to know how to install it let me know in the comment.
I hope you enjoyed this video.
For more video, please like and subscribe.
Codes:
Connect.php : github.com/gledisqose/RUclips...
Arduino Code: github.com/gledisqose/RUclips...
-----------------------------------------------------------------------------------------------------------
Music: • Diamond Eyes - Flutter... - Наука
what changes would you make in the code if you use a sound sensor? I tried but it didn't work
thanks for this video well i have a question i have esp32 and is it possible to wire the sensors to the arduino directly and then send the data to the db ?
Great work and very specific to my search dude. Thank you🙏
Can we use ESP 32 or ESP32D for this project? please help
Thanks for this tutorial, but I want to know how can I control multible gsm module from same webpage, lets say each gsm module is connected to one arduino where I need to be able to control LED from each arduino from a webpage.
Do you need serial port connection for this project( do esp need to be connected to PC all the time?), can pc be off?
It worked fine for DHT11. But when I tried to include other sensors such as pulse sensor, it fails.
why ?
Thx dude, very simple and easy 👌
i don't understand the hostname part.. what should I write over there?? just alter vista for example?
will the steps be same for multiple sensors data from auridino
Please let me know the Board Manager used in this case.Thank you
A great video😊. Can I use a privately hosted MySQL db for the same purpose or only the localhost one.
Thanks i got what i have been looking for!!!!!!!!
can some one tell me what host could be. I recieve connect failed all the time, I had tried to use localhost
hi, some more ... now I get an error with "mysql_native_password!" ... continuing ... "Got packets out of order closing connection". So, it is very typical, but how to get around it?? Please, help.
great video, thanks for sharing.
Any chance to show how I 'read' data saved in mysql?
Hello,
This is an excellent example of IOT used case scenario. But how could be automated this in real world application.
I mean in terms of data pipeline, from ETL this is just the Loading of data to database. What about extraction and transformation???
Can you please explain the implementation in terms of ETL pipeline, how could this be achieved?
Thanks.
what would the most likely reason be. if we are getting connection failed message(server connection failed)
It works locally, but it doesn't work on the internet, ie when configured for external host. I've tried everything.
hi tnx for video
i have some problem..
i use phpmyadmin in raspberry pi and for uploding cod for esp8266 i'm used windows,so..
where should I put the connect.php file in Raspberry Pi ??
How difficult it is to find content that you provide on this topic!
Need help. Urgent. I want to send data to my API using esp8266 and I don't kwow how to do it. Data is current voltage power consumption.
Hello sir how can I upload data from sensor connect with ESP32 to the server in my pc?using get function.
If u wanted to help me , I need the cod of .ino and Code .php
Thank u I wish to reply me.
I’ve done similar work with streaming live data. The arduino functions as a pseudo async client and I stream data to a database. The server I wrote makes decisions and switches the arduino to different states to do different things.
I work on a similar project. you can give me your email to contact you please ?
@@achrafbouzidi6656 sure.
@@professorstratios8228 can you tell me how to do that?
@@TS-ev9br interrupts and a simple finite state machine
And a server in C#
Something is wrong with the TCP communication, I am getting the below error:
bad 400..?Bad Request. Your browser sent a request that this server could not understand.
I have checked the same URL from my phone and it works.
Hello, can you help me? I got problem when i'm trying to compile the arduino code. There is an error message invalid conversion from 'const char*' to 'char*' [-fpermissive] on WiFi.begin(ssid, password); code. How to solve it? Thanks
Do not change the const char* to char* because the code itself doesn't allow it, the variable must remain unchanged
can it run wirelessly?
and need the same wifi connection?
can it run on mobile hotspot?
In Schematic Diagram i could see the DHT pin is connected to GPIO06 (connected to the integrated SPI flash) but in the code DHTPIN is connected to 22 , could you please explain as to which pin to be used.Thank you in advance.
use what pin you want, you jest need to change it to the code #define DHTPIN 22
hi can you tell me where you save the connect php , and what this host name please replly.
hello
I need some help to send distance to a database with Arduino Nano, can someone help me
can i ask u if use a online database using https how can use same method using this type metod
can i use esp8266-01 and Arduino instead of Nodemcu
what need to put inside host in arduino code?
hello, i need your help. i want to reduce the number of outputs being sent to the DB. like say, after an interval of 5 seconds. how can i go about this
is easy look for delay = 1ms so just increment this value 1000 = 1sec so 5000 = 5sec, i think it will work
@@Drakanx i tried but the data is still being posted after every one second
@@akimanyajackson1928 you need creat another delay ar the end,
Not working.
Showing. Serial Doesn't name a type and Various errors in the code 😓. So sad. spent a night on it
The cables on the sketch are wrong. Where the red, must be the green.
Very interesting; In the video it is not possible to observe the code well. I am grateful if you tell me where I can locate the code to implement it in ESP32. The code in PHP is clear.
where does the port 5555 came from?
If i want to use and adxl345 for send values like X Y Z i just need to change variables right?
yes
@@gledisqose8330 i will try change then
@@gledisqose8330 how should i change variable like "float temperature = dht.readTemperature();"?
@@Drakanx no you need to find a header for that sensor and read the documentation and you will find the way how to get data from your sensor.
Then you can use it however you want.
And if I wanna send datas from Mongo DB?
Thanks ! I have a question ; is it possible to send data to remotely database without php code ?
Yes with C for exemple or any programming language that may have a MySQL api
whick kind of esp are you using?? ESP32?? thanks
Does ESP 32 D work ?
WORK!!!. if you have problem ini host name. you can use your ip . i mean . 192.x.x.x. and use port 80. and work
hostnamenya isinnya gmna jadinya bro? tolong bantu conection failed terus
Kindly make a video on how to upload data on website
Great Job ! but what did you mean by host ? I work with Xampp server , should I write const char* host = "localhost" ;?
did you figure out that? I wrote this "const char* host = "localhost" ; " but it gives me error
@@rebecalobao3888same problem, did you fixed?
@@user-yf1qq2px1i same problem
Shall I use the hostname or my server Ip address here? I have tried n number of times the same way, but my connection keeps on failing while I try with the Ip address. Please help if possible.
are you using a local server?
@@gledisqose8330 Yes, I used the Ipv4 address in my code.
@@kaushikibhattacharya2821 have you run the apache2?
@@gledisqose8330 Yes, ofcourse. I am using Apache 2.4.
Perfekt... thx thats what i search
sir how to do this using tof sensor
i dont know what i need to use for the host name
I am getting a "connection failed" error even though I set the database correctly, how can we fix it?
Hey man, i have the same problem, did u solve it?
@@venus_5709 Hi, did you manage to find the solution
Did you solve it?
how to know about httpPort and host I used? currently I'm using ubuntu
httpPort and host does not have to do whith your OS.
if your host is on internet the http Port is 80(443 for https) but if you are runing it in your machine you can set host as localhost or ex. 127.0.0.1 and your port.
Thankyou very much!!!
What type of ESP u use? ESP8266?
great video, thanks bro
this is high value content
In host can I put the IP address of the laptop I'm working on? Because I tried this and it keeps saying "connection failed"
Have you set up a local server?
If yes, put the loopback ip to host.
@@gledisqose8330 Thanks for the answer but I keep getting "connection failed"; I set up a local server using Wamp64 and I have the php file in www folder as the video said
@@htroyanis33 got any solution?
have u solve it, I get the same problem
@@naturefriends3531 yeah, I started using Xampp and I didn't have any issues
Thank you so much sir
Successfully configured thanks a lot
connection failed
@@shahbaztech7064 do you resolve the problem? Thx
how connect tcs3200 to nodemcu to database
Notice: Undefined index: temperature in C:\xampp\htdocs\iot\connect.php on line 20
Notice: Undefined index: humidity in C:\xampp\htdocs\iot\connect.php on line 21
in my line 20 and 21 just
$temperature = $_GET["temperature"];
$humidity = $_GET["humidity"];
is there anyone knows what's the problem ?
please help im also facing the same challenge
@@mikenyandoro180 i've Been solved the problem. Just make sure your program which to return the value in mysqli_query (...)
@@rafi6170 i have the same problem. how to solve it
@@rafi6170 how to solve it? i have the same problem
Thanks for sharing ♥️
&temperature in your php code you set $d1 to GET temperature but how do you get $b1 in your db because you never reuse b1 I notice... It won't work in my project so it would be nice if you could explain that a little bit, thanks!
*And &temprature you use in your arduino, where does that stand for?
where did you find $b1
@@gledisqose8330 sorry my mistake I mean $d1.
@@raniverelst yeah whatever but where do you saw it?
connect.php?
Bro how can I know my http port ???
please
connections failed error
i don'k know why
hai, my serial monitor say connection failed... i put my host as 127.0.0.1 and http port as 80... can u help me.... should be more clearer..at this point, i think i have a problem with the host name and the port...i tried many combinations from my wifi's ip to localhost using apache ports which are 80, 443... it all resulted the same.... maybe im not clear on how to determine the host and port..
wish you could hellp
Try using the ip of your pc and port 80
@@gledisqose8330 thank god it worked. although, i still didnt manage to successfully send the data...its showing 400 bad request on the serial monitor.. what could the cause be?
@@gledisqose8330 nvm it works nowww..i chose the wrong ip ..thank you so much...your video rocks
@@izhanhanafi9348 hy , how did you manage to make it work
hello, nice vid. I have a question though. Can this be applied to web host? if so, what should I write on the "$dbhost = 'localhost'; " part? Tia
the webhost that u want to use
I think that it is very dengerous send authorization data (login and password) without ssl
hey man what should be the host in the .ino code
should be the domain or the IP of your website
can I use 'localhost ' in this place
Could you please let me know the ESP32 model you are using
Aditya M wroom 32s
@@gledisqose8330 Thank you
what is wamp64 folder? i can't find the folder. pls help me
go to C:\www\wamp64
@@gledisqose8330 is that the same as xampp?
@@michaelnathaniel2385 yes
i used xamp, and i used host = "localhost", always said connection failed, i set the port to 80
same
same problem ,did you solve this problem?
@@soukaina7054 yea i solved the problem, the problem is your esp cant acces the local, i will tell you how to fix it
bad 400..?Bad Request. Your browser sent a request that this server could not understand.
what is host here
im getting error -1
can i use xampp (not wamp) with your code?
Yes
@@gledisqose8330 thank u... how to setup my ssid, password and host? "3.30"
ssid = my wifi name.
password = my password wifi
host name = ?
pls help... im a begiiner
Arfend Khalifa host name is the name of your server. If you are in local host the host name is “localhost” or “127.0.0.1”
@@gledisqose8330 const char* host = "127.0.0.1";
like this bro? still conection failed :(
thanks
Hello sir need some help.. Please reply !!
Hello, tell me..
Sir I want to upload data from node mcu to a web host called "000webhost". There I am uploading data into MySql database.
Can you provide a simple code.. I am using ultrasonic sensors
You need your full domain of your webserver, like : mywebsite.000webhost.com and you shoud edit it in the code
Well explained !
Thanks
can help my please, i use hostname db with my IP ,192.168.43.xxx, and why i got notification on Serial monitor Arduino like this jHost '192.168.43.xxx' is not allowed to connect to this MariaDB,
hi, thank you for the video, but have you ever sent data from ESP to MySQL server? thank you
That's what the video is all about...
In this way, The database storage will be full.
hostname where I get?
is the ip of the computer you used as server,
or if you run your server online is the server ip or domain
@@gledisqose8330 I used my computer as a server
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld
DHT11 Output!
what the fk is that lol
Love U
Habla tío 😂
Тут есть адекватные? Какого хрена тут php? Трудно видео назвать что идёт соединение через веб сервер? А не на прямую с базой. Тьфу...
Hello I use XAMPP and I'm having difficulty in the part where I use these lines " HTTP/1.1rn" +
"Host: " + host + "
" +
"Connection: close
");