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...
  • НаукаНаука

Комментарии • 189

  • @mokarrommahmud8575
    @mokarrommahmud8575 3 года назад

    what changes would you make in the code if you use a sound sensor? I tried but it didn't work

  • @ms5452
    @ms5452 2 года назад

    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 ?

  • @ochienoeliud5723
    @ochienoeliud5723 2 года назад

    Great work and very specific to my search dude. Thank you🙏

  • @adityam5344
    @adityam5344 4 года назад +2

    Can we use ESP 32 or ESP32D for this project? please help

  • @jacksonmgani4411
    @jacksonmgani4411 2 года назад

    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.

  • @user12sb
    @user12sb Год назад

    Do you need serial port connection for this project( do esp need to be connected to PC all the time?), can pc be off?

  • @tekathegreat
    @tekathegreat 2 года назад

    It worked fine for DHT11. But when I tried to include other sensors such as pulse sensor, it fails.
    why ?

  • @rifkynugrahautama950
    @rifkynugrahautama950 2 года назад +2

    Thx dude, very simple and easy 👌

  • @danieledimeo5172
    @danieledimeo5172 2 года назад

    i don't understand the hostname part.. what should I write over there?? just alter vista for example?

  • @rishabhsaxena2071
    @rishabhsaxena2071 2 года назад +1

    will the steps be same for multiple sensors data from auridino

  • @adityam5344
    @adityam5344 4 года назад

    Please let me know the Board Manager used in this case.Thank you

  • @happymatekenya394
    @happymatekenya394 10 месяцев назад

    A great video😊. Can I use a privately hosted MySQL db for the same purpose or only the localhost one.

  • @abrehamsenay5837
    @abrehamsenay5837 2 года назад +1

    Thanks i got what i have been looking for!!!!!!!!

  • @phongphamviet9536
    @phongphamviet9536 3 года назад +1

    can some one tell me what host could be. I recieve connect failed all the time, I had tried to use localhost

  • @janneraatikainen9453
    @janneraatikainen9453 3 года назад

    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.

  • @lucianosantile8609
    @lucianosantile8609 2 года назад +3

    great video, thanks for sharing.
    Any chance to show how I 'read' data saved in mysql?

  • @r7918
    @r7918 Год назад

    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.

  • @tekathegreat
    @tekathegreat 2 года назад

    what would the most likely reason be. if we are getting connection failed message(server connection failed)

  • @nix-sal
    @nix-sal Год назад

    It works locally, but it doesn't work on the internet, ie when configured for external host. I've tried everything.

  • @alikheyrandish1265
    @alikheyrandish1265 4 года назад

    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 ??

  •  3 года назад +4

    How difficult it is to find content that you provide on this topic!

  • @cynthiaaban6838
    @cynthiaaban6838 3 года назад

    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.

  • @alsahiq.n.4989
    @alsahiq.n.4989 4 года назад

    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.

  • @professorstratios8228
    @professorstratios8228 4 года назад +3

    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.

  • @diytricks7234
    @diytricks7234 3 года назад

    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.

  • @akbarnaufalmakarim
    @akbarnaufalmakarim 4 года назад +2

    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

    • @gledisqose8330
      @gledisqose8330  4 года назад

      Do not change the const char* to char* because the code itself doesn't allow it, the variable must remain unchanged

  • @rosemain123
    @rosemain123 Год назад +1

    can it run wirelessly?
    and need the same wifi connection?
    can it run on mobile hotspot?

  • @adityam5344
    @adityam5344 4 года назад

    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.

    • @gledisqose8330
      @gledisqose8330  4 года назад +1

      use what pin you want, you jest need to change it to the code #define DHTPIN 22

  • @ramibouz911
    @ramibouz911 3 года назад

    hi can you tell me where you save the connect php , and what this host name please replly.

  • @jeantoscanelli4188
    @jeantoscanelli4188 3 года назад

    hello
    I need some help to send distance to a database with Arduino Nano, can someone help me

  • @hermitcow7045
    @hermitcow7045 Год назад

    can i ask u if use a online database using https how can use same method using this type metod

  • @shehabxcode
    @shehabxcode 2 года назад

    can i use esp8266-01 and Arduino instead of Nodemcu

  • @muhddhaifullah5750
    @muhddhaifullah5750 2 года назад

    what need to put inside host in arduino code?

  • @akimanyajackson1928
    @akimanyajackson1928 4 года назад +1

    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

    • @Drakanx
      @Drakanx 4 года назад +1

      is easy look for delay = 1ms so just increment this value 1000 = 1sec so 5000 = 5sec, i think it will work

    • @akimanyajackson1928
      @akimanyajackson1928 4 года назад

      @@Drakanx i tried but the data is still being posted after every one second

    • @Drakanx
      @Drakanx 4 года назад

      @@akimanyajackson1928 you need creat another delay ar the end,

  • @abdullahalbaker2205
    @abdullahalbaker2205 Год назад +1

    Not working.
    Showing. Serial Doesn't name a type and Various errors in the code 😓. So sad. spent a night on it

  • @pablosaizortuno4740
    @pablosaizortuno4740 3 года назад

    The cables on the sketch are wrong. Where the red, must be the green.

  • @adolfoleonhernandezabadia5360
    @adolfoleonhernandezabadia5360 3 года назад +3

    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.

  • @rexsovelllejes9383
    @rexsovelllejes9383 7 месяцев назад

    where does the port 5555 came from?

  • @Drakanx
    @Drakanx 4 года назад

    If i want to use and adxl345 for send values like X Y Z i just need to change variables right?

    • @gledisqose8330
      @gledisqose8330  4 года назад

      yes

    • @Drakanx
      @Drakanx 4 года назад

      @@gledisqose8330 i will try change then

    • @Drakanx
      @Drakanx 4 года назад

      @@gledisqose8330 how should i change variable like "float temperature = dht.readTemperature();"?

    • @gledisqose8330
      @gledisqose8330  4 года назад +1

      @@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.

  • @MarcoGarcia-kt7kw
    @MarcoGarcia-kt7kw 2 года назад

    And if I wanna send datas from Mongo DB?

  • @ammarsulaiman4555
    @ammarsulaiman4555 3 года назад

    Thanks ! I have a question ; is it possible to send data to remotely database without php code ?

    • @yesno6042
      @yesno6042 3 года назад

      Yes with C for exemple or any programming language that may have a MySQL api

  • @davidecolombini7562
    @davidecolombini7562 Год назад

    whick kind of esp are you using?? ESP32?? thanks

  • @adityam5344
    @adityam5344 4 года назад

    Does ESP 32 D work ?

  • @msmujahidin4351
    @msmujahidin4351 4 года назад +1

    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

    • @arfendkhalifa
      @arfendkhalifa 4 года назад

      hostnamenya isinnya gmna jadinya bro? tolong bantu conection failed terus

  • @electronicsguide4603
    @electronicsguide4603 3 года назад

    Kindly make a video on how to upload data on website

  • @bennafkhaayaa5956
    @bennafkhaayaa5956 2 года назад +2

    Great Job ! but what did you mean by host ? I work with Xampp server , should I write const char* host = "localhost" ;?

    • @rebecalobao3888
      @rebecalobao3888 Год назад

      did you figure out that? I wrote this "const char* host = "localhost" ; " but it gives me error

    • @user-yf1qq2px1i
      @user-yf1qq2px1i Год назад

      @@rebecalobao3888same problem, did you fixed?

    • @rooy598
      @rooy598 Год назад

      ​@@user-yf1qq2px1i same problem

  • @kaushikibhattacharya2821
    @kaushikibhattacharya2821 3 года назад

    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.

  • @kainh8400
    @kainh8400 Год назад

    Perfekt... thx thats what i search

  • @bharathkalyaan3855
    @bharathkalyaan3855 3 года назад

    sir how to do this using tof sensor

  • @rayannnn7582
    @rayannnn7582 Год назад

    i dont know what i need to use for the host name

  • @dogukanbicer4228
    @dogukanbicer4228 2 года назад +3

    I am getting a "connection failed" error even though I set the database correctly, how can we fix it?

    • @venus_5709
      @venus_5709 2 года назад +2

      Hey man, i have the same problem, did u solve it?

    • @quinnn449
      @quinnn449 Год назад

      @@venus_5709 Hi, did you manage to find the solution

    • @sagunrai8689
      @sagunrai8689 Месяц назад

      Did you solve it?

  • @lmarkrol
    @lmarkrol 4 года назад +1

    how to know about httpPort and host I used? currently I'm using ubuntu

    • @gledisqose8330
      @gledisqose8330  4 года назад

      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.

  • @tekathegreat
    @tekathegreat 2 года назад +1

    Thankyou very much!!!

  • @ohok8615
    @ohok8615 Год назад

    What type of ESP u use? ESP8266?

  • @rafidimasariyanto2599
    @rafidimasariyanto2599 2 года назад

    great video, thanks bro

  • @watipasokamanga8908
    @watipasokamanga8908 10 месяцев назад

    this is high value content

  • @htroyanis33
    @htroyanis33 4 года назад

    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"

    • @gledisqose8330
      @gledisqose8330  4 года назад

      Have you set up a local server?
      If yes, put the loopback ip to host.

    • @htroyanis33
      @htroyanis33 4 года назад

      @@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

    • @naturefriends3531
      @naturefriends3531 3 года назад

      @@htroyanis33 got any solution?

    • @phongphamviet9536
      @phongphamviet9536 3 года назад

      have u solve it, I get the same problem

    • @htroyanis33
      @htroyanis33 3 года назад

      @@naturefriends3531 yeah, I started using Xampp and I didn't have any issues

  • @adityapandya8098
    @adityapandya8098 2 года назад

    Thank you so much sir

  • @adityam5344
    @adityam5344 4 года назад +2

    Successfully configured thanks a lot

  • @bejaybaquiran8721
    @bejaybaquiran8721 Год назад

    how connect tcs3200 to nodemcu to database

  • @rafi6170
    @rafi6170 4 года назад +3

    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 ?

    • @mikenyandoro180
      @mikenyandoro180 3 года назад

      please help im also facing the same challenge

    • @rafi6170
      @rafi6170 3 года назад

      @@mikenyandoro180 i've Been solved the problem. Just make sure your program which to return the value in mysqli_query (...)

    • @mrizki4344
      @mrizki4344 3 года назад

      @@rafi6170 i have the same problem. how to solve it

    • @AttalaSurya
      @AttalaSurya 3 года назад

      @@rafi6170 how to solve it? i have the same problem

  • @rupeshpatil1811
    @rupeshpatil1811 2 года назад

    Thanks for sharing ♥️

  • @raniverelst
    @raniverelst 4 года назад

    &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!

    • @raniverelst
      @raniverelst 4 года назад

      *And &temprature you use in your arduino, where does that stand for?

    • @gledisqose8330
      @gledisqose8330  4 года назад

      where did you find $b1

    • @raniverelst
      @raniverelst 4 года назад

      @@gledisqose8330 sorry my mistake I mean $d1.

    • @gledisqose8330
      @gledisqose8330  4 года назад

      @@raniverelst yeah whatever but where do you saw it?

    • @gledisqose8330
      @gledisqose8330  4 года назад

      connect.php?

  • @Jimmy_Neutron
    @Jimmy_Neutron Год назад

    Bro how can I know my http port ???
    please

  • @sarathkumar-gq8be
    @sarathkumar-gq8be 2 года назад

    connections failed error
    i don'k know why

  • @izhanhanafi9348
    @izhanhanafi9348 4 года назад

    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..

    • @izhanhanafi9348
      @izhanhanafi9348 4 года назад

      wish you could hellp

    • @gledisqose8330
      @gledisqose8330  4 года назад

      Try using the ip of your pc and port 80

    • @izhanhanafi9348
      @izhanhanafi9348 4 года назад

      @@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?

    • @izhanhanafi9348
      @izhanhanafi9348 4 года назад

      @@gledisqose8330 nvm it works nowww..i chose the wrong ip ..thank you so much...your video rocks

    • @farcasclaudiu8103
      @farcasclaudiu8103 4 года назад

      @@izhanhanafi9348 hy , how did you manage to make it work

  • @wardenclyffepark486
    @wardenclyffepark486 3 года назад

    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

  • @PiotrKoneV
    @PiotrKoneV 2 года назад

    I think that it is very dengerous send authorization data (login and password) without ssl

  • @6ftCaptures
    @6ftCaptures 4 года назад

    hey man what should be the host in the .ino code

  • @adityam5344
    @adityam5344 4 года назад

    Could you please let me know the ESP32 model you are using

  • @michaelnathaniel2385
    @michaelnathaniel2385 4 года назад

    what is wamp64 folder? i can't find the folder. pls help me

  • @Stolius
    @Stolius 10 месяцев назад

    i used xamp, and i used host = "localhost", always said connection failed, i set the port to 80

    • @Roxill_19
      @Roxill_19 5 месяцев назад

      same

    • @soukaina7054
      @soukaina7054 Месяц назад

      same problem ,did you solve this problem?

    • @Stolius
      @Stolius Месяц назад

      @@soukaina7054 yea i solved the problem, the problem is your esp cant acces the local, i will tell you how to fix it

  • @faizalanwar3148
    @faizalanwar3148 4 года назад

    bad 400..?Bad Request. Your browser sent a request that this server could not understand.

  • @arunkumard7511
    @arunkumard7511 2 года назад

    what is host here

  • @mikenyandoro180
    @mikenyandoro180 3 года назад

    im getting error -1

  • @arfendkhalifa
    @arfendkhalifa 4 года назад

    can i use xampp (not wamp) with your code?

    • @gledisqose8330
      @gledisqose8330  4 года назад

      Yes

    • @arfendkhalifa
      @arfendkhalifa 4 года назад

      @@gledisqose8330 thank u... how to setup my ssid, password and host? "3.30"

    • @arfendkhalifa
      @arfendkhalifa 4 года назад

      ssid = my wifi name.
      password = my password wifi
      host name = ?
      pls help... im a begiiner

    • @gledisqose8330
      @gledisqose8330  4 года назад

      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”

    • @arfendkhalifa
      @arfendkhalifa 4 года назад

      @@gledisqose8330 const char* host = "127.0.0.1";
      like this bro? still conection failed :(

  • @mohamedaitmouali895
    @mohamedaitmouali895 4 года назад

    thanks

  • @manzariqbal6200
    @manzariqbal6200 4 года назад

    Hello sir need some help.. Please reply !!

    • @gledisqose8330
      @gledisqose8330  4 года назад +1

      Hello, tell me..

    • @manzariqbal6200
      @manzariqbal6200 4 года назад

      Sir I want to upload data from node mcu to a web host called "000webhost". There I am uploading data into MySql database.

    • @manzariqbal6200
      @manzariqbal6200 4 года назад

      Can you provide a simple code.. I am using ultrasonic sensors

    • @gledisqose8330
      @gledisqose8330  4 года назад +1

      You need your full domain of your webserver, like : mywebsite.000webhost.com and you shoud edit it in the code

  • @m74w
    @m74w Год назад

    Well explained !
    Thanks

  • @rizapahlawan4909
    @rizapahlawan4909 2 года назад

    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,

  • @khanhquang3803
    @khanhquang3803 4 года назад

    hi, thank you for the video, but have you ever sent data from ESP to MySQL server? thank you

    • @tasteful7364
      @tasteful7364 3 года назад +2

      That's what the video is all about...

  • @TechTalksbyRanga
    @TechTalksbyRanga 2 месяца назад

    In this way, The database storage will be full.

  • @sarma_sarma
    @sarma_sarma 3 года назад

    hostname where I get?

    • @gledisqose8330
      @gledisqose8330  3 года назад

      is the ip of the computer you used as server,
      or if you run your server online is the server ip or domain

    • @sarma_sarma
      @sarma_sarma 3 года назад

      @@gledisqose8330 I used my computer as a server

  • @youtubeboy5700
    @youtubeboy5700 2 года назад

    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

  • @muhammadjameelkhan8853
    @muhammadjameelkhan8853 2 года назад

    Love U

  • @PraexorVS
    @PraexorVS 3 года назад

    Habla tío 😂

  • @izada666
    @izada666 Год назад

    Тут есть адекватные? Какого хрена тут php? Трудно видео назвать что идёт соединение через веб сервер? А не на прямую с базой. Тьфу...

  • @macanudo_jeff
    @macanudo_jeff Год назад

    Hello I use XAMPP and I'm having difficulty in the part where I use these lines " HTTP/1.1rn" +
    "Host: " + host + "
    " +
    "Connection: close

    ");