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



MySQL CRUD Operations in Node.js application.

In this tutorial, we’ll discuss how to implement crud operation insert update delete and view all in node.js with MySQL database.

Content Discussed :
– How to Connect MySQL DB from Node.js
– Execute MySQL Query From Node.js
– Use of MySQL Store Procedure in Node.js.

πŸ“– Best Node.JS Book from Amazon (Affiliate) :
➀ http://geni.us/UvK8B

Download Project From :
➀ https://goo.gl/3JKBNM

β˜• Buy me a Coffee (Channel Support through Donation)
➀ https://goo.gl/bPcyXW

Subscribe to this channel Link to this video
➀ https://goo.gl/RFY5C2 ➀ http://bit.ly/31KwgeY

________________ πŸŒ€ Related Links __________________
https://goo.gl/T9Nb8r : Angular CRUD with Web API
https://goo.gl/wp17ta : Angular User Registration With Web API
https://goo.gl/4gDFfC : Angular Login Logout With Web API
https://goo.gl/ySUFf8 : Similar Mvc Tutorials

________________ 🌟 About this Channel ______________
CodAffection – [ New videos every Monday at 12:30 PM UTC. ].
This channel is all about teaching and motivating software developers to build applications/ websites in various technologies/ programming languages like Angular, NodeJS, Asp.Net, C#, JavaScript, SQL, Python, etc.

________________ πŸ”— Social Media Links ______________
Blog : http://www.codaffection.com
Facebook : https://www.facebook.com/codaffection
Twitter : https://twitter.com/codaffection
Youtube : https://youtube.com/codaffection

________________ πŸ“š Most Recommended Books _______
Code Complete(2nd Edition) : https://geni.us/s6AK9t
The Art of Computer Programming : https://geni.us/Ko4H8m
Clean Code : https://geni.us/Jf9EBTB
Design Patterns : https://geni.us/OMPP
The Pragmatic Programmer : https://geni.us/8UM9F

________________ πŸ’° Purchase for Developers _________
πŸ’» Laptops
MacBook Air : https://geni.us/fHZzRiB
Dell XPS 9570 : https://geni.us/rYB6
ASUS ZenBook 13 : https://geni.us/LDKE
Lenovo Ideapad : https://geni.us/Mwvg2
⌨️ Keyboard : Das 4 Professional : https://geni.us/hkAdzi
πŸ–±οΈ Mouse : VicTsing : https://geni.us/tjIM48M
🎧 Headphone : Mpow 059 Bluetooth : https://geni.us/wAPDmP

________________ 🎬 All Playlist _______________________
http://bit.ly/2KQN9xF : Angular
http://bit.ly/30fPDMg : Asp.Net Core
https://goo.gl/viJcFs : Node JS
https://goo.gl/gvjUJ7 : Asp.Net MVC
https://goo.gl/itVayJ : Web API
https://goo.gl/YJPPAH : MEAN Stack
https://goo.gl/s1zJxo : C# Tutorial
https://goo.gl/GXC2aJ : Asp.Net WebForm
https://goo.gl/vHS9Hd : C# WinForm
https://goo.gl/MLYS9e : MS SQL
https://goo.gl/5Vou7t : Crystal Report
https://goo.gl/EPZ69B : Common C# Excercises
https://goo.gl/qEWJCs : CG Exercises in C Program

#NodeJS #CodAffection #CodAffectionNodeJS

Original source

26 thoughts on “Node.js + MySQL CRUD – GET,POST,PUT and DELETE

  • September 15, 2019 at 16:45
    Permalink

    im getting the below Please help me to solve this
    could not able to get DB Connection.

    F:workspace-angularProject>node index.js

    DB Connection failed

    Error:{

    "code": "ER_ACCESS_DENIED_ERROR",

    "errno": 1045,

    "sqlMessage": "Access denied for user 'root'@'localhost' (using password: YES)",

    "sqlState": "28000",

    "fatal": true

    }

    (node:492) [DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead.

  • September 15, 2019 at 16:45
    Permalink

    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:Usersrw888Desktopprojectpackage.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:Usersrw888Desktopprojectindex.js

  • September 15, 2019 at 16:45
    Permalink

    hi, i'm getting error like this

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)←[39m

    ←[90m at Function.Module._load (internal/modules/cjs/loader.js:527:27)←[39m

  • September 15, 2019 at 16:45
    Permalink

    to fix DB failed, paste ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_current_password'; inside of your database in work bench and restart your node file again in the terminal.

  • September 15, 2019 at 16:45
    Permalink

    Excellent!. Concise, precise, direct and accurate. I tried mysql v8.0 initially. It threw error about authentication/authorization. Changed to mysql 5.6 and then everything went fine. Can you show how to work with mysql v8.0, the latest? Thanks.

  • September 15, 2019 at 16:45
    Permalink

    why res.send() is not working in my code ?
    It shows on the command prompt "res.send is not a function" , what is a solution of this problem ?

  • September 15, 2019 at 16:45
    Permalink

    Where is the front end for this app? I would like to see the end result before beginning the tutorial.

    Thanks

  • September 15, 2019 at 16:45
    Permalink

    Hi,
    I'm getting the following error while trying to connect db :
    DB connection failed
    errro : {
    "code": "ER_ACCESS_DENIED_ERROR",
    "errno": 1045,
    "sqlMessage": "Access denied for user 'root'@'localhost' (using password: YES)",
    "sqlState": "28000",
    "fatal": true
    }

  • September 15, 2019 at 16:45
    Permalink

    I am getting the error message after insert query:
    I have table name LSMD

    code: 'ER_NO_SUCH_TABLE',
    errno: 1146,
    sqlMessage: 'Table 'LSMD.employee' doesn't exist',
    sqlState: '42S02',
    index: 4,
    sql:
    'SET @EmpID = 0;SET @Name = 'Waheed Ali';SET @EmpCode = 'EMP95';SET @Salary = 53210; CALL EmployeeAddorEdit(@EmpID,@Name,@EmpCode,@Salary);' }

  • September 15, 2019 at 16:45
    Permalink

    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!

Leave a Reply