Send Data From ESP to MySQL Database! Updated 2019 | 100% working.

Поділитися
Вставка
  • Опубліковано 12 гру 2024

КОМЕНТАРІ • 189

  •  3 роки тому +5

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

  • @adityam5344
    @adityam5344 4 роки тому +4

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

  • @dogukanbicer4228
    @dogukanbicer4228 2 роки тому +5

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

    • @venus_5709
      @venus_5709 2 роки тому +3

      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 6 місяців тому

      Did you solve it?

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

  • @rishabhsaxena2071
    @rishabhsaxena2071 2 роки тому +1

    will the steps be same for multiple sensors data from auridino

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

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

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

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

  • @mokarrom_z2
    @mokarrom_z2 4 роки тому

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

  • @rosemain123
    @rosemain123 Рік тому +1

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

  • @lucianosantile
    @lucianosantile 3 роки тому +3

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

  • @happymatekenya394
    @happymatekenya394 Рік тому

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

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

    • @АлиханУзакбай-т2ф
      @АлиханУзакбай-т2ф Рік тому

      @@rebecalobao3888same problem, did you fixed?

    • @rooy598
      @rooy598 Рік тому

      ​@@АлиханУзакбай-т2ф same problem

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

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

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

  • @adityam5344
    @adityam5344 4 роки тому

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

  • @rifkynugrahautama950
    @rifkynugrahautama950 2 роки тому +3

    Thx dude, very simple and easy 👌

  • @abdullahalbaker2205
    @abdullahalbaker2205 2 роки тому +1

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

  • @danieledimeo5172
    @danieledimeo5172 2 роки тому

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

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

  • @adolfoleonhernandezabadia5360
    @adolfoleonhernandezabadia5360 4 роки тому +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.

  • @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 4 роки тому

      please help im also facing the same challenge

    • @rafi6170
      @rafi6170 4 роки тому

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

    • @mrizki4344
      @mrizki4344 4 роки тому

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

    • @AttalaSurya
      @AttalaSurya 3 роки тому

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

  • @tekathegreat
    @tekathegreat 3 роки тому

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

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

  • @ochienoeliud5723
    @ochienoeliud5723 2 роки тому

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

  • @AxolotlChronicles
    @AxolotlChronicles Рік тому

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

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

  • @nix-pu2niv
    @nix-pu2niv 2 роки тому

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

  • @tekathegreat
    @tekathegreat 3 роки тому

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

  • @cynthiaaban6838
    @cynthiaaban6838 4 роки тому

    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.

  • @davidecolombini7562
    @davidecolombini7562 Рік тому

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

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

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

  • @electronicsguide4603
    @electronicsguide4603 3 роки тому

    Kindly make a video on how to upload data on website

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

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

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

  • @rexsovelllejes9383
    @rexsovelllejes9383 Рік тому

    where does the port 5555 came from?

  • @muhddhaifullah5750
    @muhddhaifullah5750 2 роки тому

    what need to put inside host in arduino code?

  • @abrehamsenay5837
    @abrehamsenay5837 3 роки тому +1

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

  • @ohok8615
    @ohok8615 2 роки тому

    What type of ESP u use? ESP8266?

  • @ramibouz911
    @ramibouz911 3 роки тому

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

  • @ammarsulaiman4555
    @ammarsulaiman4555 4 роки тому

    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

  • @shehabxcode
    @shehabxcode 3 роки тому

    can i use esp8266-01 and Arduino instead of Nodemcu

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

  • @bejaybaquiran8721
    @bejaybaquiran8721 Рік тому

    how connect tcs3200 to nodemcu to database

  • @jeantoscanelli4188
    @jeantoscanelli4188 3 роки тому

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

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

  • @pablosaizortuno4740
    @pablosaizortuno4740 4 роки тому

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

  • @rayannnn7582
    @rayannnn7582 Рік тому

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

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

  • @MarcoGarcia-kt7kw
    @MarcoGarcia-kt7kw 2 роки тому

    And if I wanna send datas from Mongo DB?

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

  • @adityam5344
    @adityam5344 4 роки тому

    Does ESP 32 D work ?

  • @Stolius
    @Stolius Рік тому

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

    • @Roxill_19
      @Roxill_19 10 місяців тому

      same

    • @soukaina7054
      @soukaina7054 6 місяців тому

      same problem ,did you solve this problem?

    • @Stolius
      @Stolius 6 місяців тому

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

  • @bharathkalyaan3855
    @bharathkalyaan3855 3 роки тому

    sir how to do this using tof sensor

  • @TechTalksbyRanga
    @TechTalksbyRanga 7 місяців тому

    In this way, The database storage will be full.

  • @sarathkumar-gq8be
    @sarathkumar-gq8be 2 роки тому

    connections failed error
    i don'k know why

  • @adityam5344
    @adityam5344 4 роки тому

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

  • @6ftCaptures
    @6ftCaptures 5 років тому

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

  • @michaelnathaniel2385
    @michaelnathaniel2385 4 роки тому

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

  • @wardenclyffepark486
    @wardenclyffepark486 4 роки тому

    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

  • @faizalanwar3148
    @faizalanwar3148 4 роки тому

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

  • @Jimmy_Neutron
    @Jimmy_Neutron 2 роки тому

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

  • @arunkumard7511
    @arunkumard7511 3 роки тому

    what is host here

  • @PiotrKoneV
    @PiotrKoneV 3 роки тому

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

  • @adityam5344
    @adityam5344 4 роки тому +2

    Successfully configured thanks a lot

  • @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 :(

  • @mikenyandoro180
    @mikenyandoro180 4 роки тому

    im getting error -1

  • @manzariqbal6200
    @manzariqbal6200 5 років тому

    Hello sir need some help.. Please reply !!

    • @gledisqose8330
      @gledisqose8330  5 років тому +1

      Hello, tell me..

    • @manzariqbal6200
      @manzariqbal6200 5 років тому

      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 5 років тому

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

    • @gledisqose8330
      @gledisqose8330  5 років тому +1

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

  • @khanhquang3803
    @khanhquang3803 4 роки тому

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

    • @tasteful7364
      @tasteful7364 4 роки тому +2

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

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

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

  • @kainh8400
    @kainh8400 Рік тому

    Perfekt... thx thats what i search

  • @watipasokamanga8908
    @watipasokamanga8908 Рік тому

    this is high value content

  • @izada666
    @izada666 2 роки тому

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

  • @adityapandya8098
    @adityapandya8098 2 роки тому

    Thank you so much sir

  • @rafidimasariyanto2599
    @rafidimasariyanto2599 2 роки тому

    great video, thanks bro

  • @rupeshpatil1811
    @rupeshpatil1811 3 роки тому

    Thanks for sharing ♥️

  • @tekathegreat
    @tekathegreat 3 роки тому +1

    Thankyou very much!!!

  • @PraexorVS
    @PraexorVS 3 роки тому

    Habla tío 😂

  • @m74w
    @m74w 2 роки тому

    Well explained !
    Thanks

  • @mohamedaitmouali895
    @mohamedaitmouali895 4 роки тому

    thanks

  • @muhammadjameelkhan8853
    @muhammadjameelkhan8853 3 роки тому

    Love U

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

  • @macanudo_jeff
    @macanudo_jeff 2 роки тому

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

    ");