Node.js + MySQL CRUD - GET,POST,PUT and DELETE

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

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

  • @CodAffection
    @CodAffection  6 лет назад +9

    goo.gl/RFY5C2 : Subscribe to CodAffection
    goo.gl/bPcyXW : Buy me a Coffee

    • @satyamshukla4777
      @satyamshukla4777 5 лет назад

      How can using MySQL and MS-SQL on the same machine

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

      Hi, have you ever tried building the query into a middleware? I'm having issues exporting my response. Any tips?

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

      WHAT IS THIS ACCENT?

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

      Man, very thanks for this video

  • @JuanChehin
    @JuanChehin 5 лет назад +30

    [04:40] : index.js
    [07:46] : express
    [18:24] : Insert an employees (Store procedure)
    [26:05] : Update an employees

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

    At 11:10 I felt a CATHARTIC feeling, thank you mate!!
    That was the point when I understood the whole meaning of "API" and "backend". :)
    I started my learning path with courses on frontend, how to create simple webpages (HTML, CSS, JavaScript basics),
    then I learned the SQL queries of MS SQL and MySQL,
    and now I could connect the two with your help, thanks a lot!!

  • @pillboxgaming4144
    @pillboxgaming4144 5 лет назад +5

    Wow...simply wow. Took a bit for me to get everything installed and to work out my syntax errors but your tutorial is flawless. Thanks!

  • @chetangupta9622
    @chetangupta9622 5 лет назад +2

    Thank you so much, I was searching for this from 7-8 hours but nothing found , Now I have done it in one try after this tutorial. Again thanks

  • @MeganeFosteryukina
    @MeganeFosteryukina 4 года назад +6

    Amazing thank you , I'm used to use mysql for my project and when i saw for node everyone use mongodb , i learn mongodb but I'm really happy to see i tutorial for node and mysql so thank you :)

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

      Hey yukina! Do you know of a video like this, but with mongodb instead of MySQL ? That would be really helpful! Thanks :)

  • @sidneypalmeira1
    @sidneypalmeira1 6 лет назад +16

    Congrats, amazing tutorial, I imagined Node.js was a monster.

  • @tonyross2947
    @tonyross2947 4 года назад +12

    Good video. Just to make life easier at the start when you're creating a package.json file. If you type "npm init --yes", a file will be created without asking you any questions.

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

      it can also work with npm init -y ..

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

      awesome, without --yes it was giving error module not found. thanks for help :)

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

      Thanks for the info.

  • @SanskritiSharma-mk7le
    @SanskritiSharma-mk7le 9 месяцев назад

    Thanks man! It really helped... I was searching on the internet since a long...finally found something useful...Nice explanation.

  • @ChristopherAdams1
    @ChristopherAdams1 5 лет назад +14

    For anyone looking to copy and paste some SQL statements with some sample data for insert and just wanted to save some typing:
    use EmployeeDB;
    create table `employee` (
    `EmpID` int(11) not null auto_increment,
    `Name` varchar(45) default null,
    `EmpCode` varchar(45) default null,
    `Salary` int(11) default null,
    primary key (`EmpID`)
    ) engine=InnoDB auto_increment=0 default charset=utf8mb4;
    select * from employee;
    lock tables `employee` write;
    insert into `employee` values (1, 'Tommy Eatsheet', 'EMP90', 265400), (2, 'Jess Fukenson', 'EMP92', 50000),(3, 'Bob Knobhead', 'EMP95', 10000),(4, 'Dick knogginson', 'EMP96', 90000);

  • @AjaySharma-pg9wc
    @AjaySharma-pg9wc 2 года назад

    Thanks you i was looking for this entire RUclips and here i get my solution love from india😇

  • @davidangelomendoza7636
    @davidangelomendoza7636 6 лет назад +6

    This is exactly what I was looking for. Thanks !

  • @vidyashree150
    @vidyashree150 3 месяца назад

    thank you so much, i was searching it for 1 week finally i got from this video it was excellent

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

    Thanks sir I watched lots of video but that didn't worked for me but your video worked properly for thanks for such a great tutorial

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

    Thankyou so much again for such a wonderful video that make me understand Node jS API and I can say I know Node js.

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

    This is superb guidance tutorial for beginners

  • @alexisdauli8537
    @alexisdauli8537 5 лет назад +1

    Started just in the beginning, I know that this is what I was looking for. Thanks

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

    Thank you very much for the tutorial. It is the great tutorial I have met so far.

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

    excelent, Brazil here, thx for help!

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

    Great!!!! easy explaination and simple script usage

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

    thank you so much, amazing tutorial here!

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

    it is very helpful and easy way to understand api thanks a lot

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

    17:28 Did you mentioned 'ForceMan'? Why did you use it?

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

    it was very helpful ,thankyou

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

    Exactly what I needed, Thanks a lot :) Just a tip for those who are facing problem in inserting data to the database table - make EmpID AUTO_INCREMENT

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

      but in my code auto increment is not working I don't know why

  • @SurajGupta-tc2pn
    @SurajGupta-tc2pn 3 года назад +1

    very helpful tutorial.

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

    @raddy 's tutorial is awesome

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

    Thank you man, a very clear explanation!

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

    tq....exactly wat i needed ....great tutorial

  • @omid443
    @omid443 5 лет назад

    It was the best tutorial I ever watched about GET,POST,PUT and DELETE

  • @TheMezanine
    @TheMezanine 6 лет назад +1

    Thanks for this amazing clear tutorial

  • @sudhir600
    @sudhir600 6 лет назад

    thanks man.. what a great video.. easy and sharp... you saved my day. I appreciate your work.

    • @CodAffection
      @CodAffection  6 лет назад +1

      Glad you found the video helpful.

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

    Thank You so much made my day :)

  • @AbhishekSingh-dt6br
    @AbhishekSingh-dt6br 3 года назад

    Thank you so much brother. This is exactly what I wanted. 😁

  • @gauthambekal235
    @gauthambekal235 6 лет назад

    Superb explanation Sir.

  • @linden6705
    @linden6705 5 лет назад

    Exactly what I needed, great tutorial!

  • @charlesliu9768
    @charlesliu9768 6 лет назад

    The video is very useful for me, thanks for your excellent job.

  • @akshatbhardwaj4026
    @akshatbhardwaj4026 5 лет назад

    Very helpful video. Thank you so much!

    • @CodAffection
      @CodAffection  5 лет назад +1

      glad you found the video helpful.

  • @umreddy4855
    @umreddy4855 5 лет назад

    Thank you very much sir. Excellent tutorial.

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

    Very Nice, Very Easy

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

    Indian coding YTbers are carrying us through quarantine projects/assignments

  • @lofilips
    @lofilips 5 лет назад

    Thank you so much for this tutorial, it's been very helpful

    • @CodAffection
      @CodAffection  5 лет назад

      Glad you found this video helpful.

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

    Thank you very much for making this :)

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

      No problem 😊, let me know if you have any suggestion for upcoming tutorial ?

  • @omid443
    @omid443 5 лет назад +1

    in 22:24 when you made a variable and called it SQL you add '@' behind each of the request data like 'set @empId = ?' I want to know why?
    I can't just do the POST!

  • @abdallahyaghi8463
    @abdallahyaghi8463 5 лет назад +1

    Thank you so much

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

    For those who get this : ER_NOT_SUPPORTED_AUTH_MODE
    after doing node index.js
    this is error is mentioning when you install sql server you selected"strong authentication", but you set a weak password. You need to reset strong password or need to choose legacy authentication method.
    Follow these steps to choose legacy authentication method
    You installed mysql server using "mysql installer"
    1)open -> "mysql intsaller"
    2)press reconfig mysql server
    3)select left side "authentication method tab"
    4)select radio button -->use legacy authentication method
    5)now stop and restart the db
    and it should work

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

    thank you

  • @amansharma141
    @amansharma141 6 лет назад +3

    love your tuts..... plz make a tutorial on "WPF login(hashed) MVVM and EF7 CRUD application with online mysql database "

  • @jaywantnarwade4775
    @jaywantnarwade4775 6 лет назад

    NIce Tutorial. Its very helpfull to me.

  • @godsonprogrammer2807
    @godsonprogrammer2807 6 лет назад +2

    You can also use MySQL server of XAMPP

  • @nrusinghabarik363
    @nrusinghabarik363 6 лет назад

    Thanks a lot for nice video tutorial

  • @shitalkarlekar7198
    @shitalkarlekar7198 5 лет назад

    You are a awesome. your video really helpful for me. thank you ..

    • @CodAffection
      @CodAffection  5 лет назад

      Thanks, let me know if you have any video suggestion related to node js.

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

    How to you run index.js file in command prompt. Here i can not run node index.js file.

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

    literally killed me with your joke 7:25

  • @HuzaifaJalali
    @HuzaifaJalali 4 года назад +4

    The table creation data:
    CREATE TABLE `employee` (
    `EmpId` INT(11) NOT NULL AUTO_INCREMENT,
    `Name` VARCHAR(45) DEFAULT NULL,
    `EmpCode` VARCHAR(45) DEFAULT NULL,
    `Salary` INT(11) DEFAULT NULL,
    PRIMARY KEY (`EmpId`))
    ENGINE = InnoDB AUTO_INCREMENT=0;

  • @102030anurag
    @102030anurag 5 лет назад +3

    I am getting the message DB connection succeded... but when passing /employees I am not seeing the table record

  • @sanelisosimelane6317
    @sanelisosimelane6317 6 лет назад

    awesome clean video I am from a Java background, this has been successfully helpful.

  • @evertonrubens
    @evertonrubens 6 лет назад

    very very good. Congratulations

  • @leenamolchacko2762
    @leenamolchacko2762 6 лет назад

    Very helpful video.Thank you so much.Keep going on -:)

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

    Awesome 👏

  • @saharabendjaballah8763
    @saharabendjaballah8763 5 лет назад +3

    This was perfect thanks a lot. Just in case someone is using this today or in the near future, I had an error on workbench
    I changed the last line of code to this
    ENGINE=iNNOdb AUTO_INCREMENT=0 DEFAULT CHARSET=utf8
    and it worked just fine
    It was the only issue I had

  • @learncodeinbangla9181
    @learncodeinbangla9181 6 лет назад

    Just Awesome. Thanks Bro..

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

    Awesome tutorial!
    Just had one question regarding the mysqlconnection.
    I noticed that you never actively closed your connection to the database. Will that cause issues in production, or are there underlying features within the packages used that help manage the connections as clients connect to your application?

  • @hironakae
    @hironakae 5 лет назад

    great tutorial!

  • @kavindu646
    @kavindu646 5 лет назад

    nice work...thnaks

  • @monteksingh2152
    @monteksingh2152 5 лет назад

    Great tutorial.

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

    Integer display width is deprecated. You don't need it, you just need 'int'.

  • @ferma6136
    @ferma6136 5 лет назад

    Thank you so much!!!!

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

    thankyou, may i ask what is difference between put and post

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

    love u bro

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

    Thank you bro. You make easy to understand.
    How to write procedure in mysql(phpmyadmin)

  • @Vinodkumar-sh9oj
    @Vinodkumar-sh9oj 4 года назад

    Why did you use stored procedure instead of normal query, is there any reason ?

  • @rude_boyie
    @rude_boyie 5 лет назад

    so how do i reopen the workspace when it shows me this?
    [Info - 8:26:41 PM] ESLint server stopped.
    [Info - 8:26:42 PM] ESLint server running in node v10.11.0
    [Info - 8:26:42 PM] ESLint server is running.
    [Info - 8:26:45 PM]
    Failed to load the ESLint library for the document c:\Users
    w888\Desktop\project\package.json
    To use ESLint please install eslint by running npm install eslint in the workspace folder project
    or globally using 'npm install -g eslint'. You need to reopen the workspace after installing eslint.
    If you are using yarn or pnpm instead of npm set the setting `eslint.packageManager` to either `yarn` or `pnpm`
    Alternatively you can disable ESLint for the workspace folder project by executing the 'Disable ESLint' command.
    [Info - 8:26:45 PM]
    Failed to load the ESLint library for the document c:\Users
    w888\Desktop\project\index.js

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

    somebody plz tell how to connect this nodejs to angular for crup operations plzzzzzzz

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

    Unable to fetch data from database. But db is connected

  • @mndrgs
    @mndrgs 5 лет назад

    Thank you!

  • @souhaylaphotographer1329
    @souhaylaphotographer1329 5 лет назад

    Nice content ! 👧

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

    What online cloud database do we use to migrate/deploy the mysql workbench database?

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

    can you tell me how can i use this to create a login feature on my HTML website using nodejs and mysqlworkbench

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

    my post method is not working it shows 200 requests but does not store data in MySQL plz help

  • @premS-94
    @premS-94 4 года назад

    Great ❤️

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

    Thank you so much, it is help me a lot, how to display data in html table?

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

    Very good video!!!!

  • @Jun-zq3bn
    @Jun-zq3bn 4 года назад +1

    how can I link the routes with a front end user interface whereby my user can fetch all the data by clicking on a button?

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

    where can I find that copy paste query? please let me know.

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

    i cant connect because the hostname , where you find hostname ?

  • @LifeIsGood1992
    @LifeIsGood1992 6 лет назад

    thank you sir !

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

    I'm getting error with rows[0]..It says "not able to read properties of undefined)

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

    I got this error message: {
    "code": "ER_NOT_SUPPORTED_AUTH_MODE",
    "errno": 1251,
    "sqlMessage": "Client does not support authentication protocol requested by server; consider upgrading MySQL client",
    "sqlState": "08004",
    "fatal": true
    }

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

    if i refactor my code into multiple files eg. routes etc do i need to create mysqlConnection object for every page? please reply thank in advance :)

  • @saikiran-dh9xh
    @saikiran-dh9xh 3 года назад

    🖤🙌🙌 greatful

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

    getting this error:
    dbconnection failed: {
    "code": "ER_NOT_SUPPORTED_AUTH_MODE",
    "errno": 1251,
    "sqlMessage": "Client does not support authentication protocol requested by server; consider upgrading MySQL client",
    "sqlState": "08004",
    "fatal": true
    }

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

    dude
    you are awesome
    greetings from chille
    PD: smoke weed
    the weed loves you if you love her

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

    sir, you didn't show how to make the model with for example sequelize?

  • @jeevithathangaraj590
    @jeevithathangaraj590 5 лет назад +1

    hello codeAffection can you make the same thing for nodejs+postgresql the connection,how to insert,update,delete using the post,get,put http request can you??

  • @mirokuzen5610
    @mirokuzen5610 6 лет назад

    is this use xampp for the mysql run?

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

    how i add response codes?

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

    I am getting error saying 1251 client does not support authentication protocol requested by server pls help

  • @Abhinav_Sharma_07
    @Abhinav_Sharma_07 6 лет назад +1

    IF U CREATE STORED PROCEDURE IN MYSQL USING XAMPP,
    THEN IST LINE IS
    CREATE PROCEDURE PROCEDURENAME(
    PROCEDURENAME IS NOT BETWEEN ANY SEMICOLONS
    AND USE DELIMETER AS //

  • @Cuisine-Code-with-Manisha
    @Cuisine-Code-with-Manisha 3 года назад

    How to create this procedure in Ubuntu terminal??