MySQL Node.js Express

Ғылым және технология

I'll show you how to connect your node application to a MySQL database to query and insert data. I will also show you how to integrate this into an express server to show what a complete backend might look like.
Chapters:
0:00​ Intro
0:32 Setup MySQL
1:50 Setup Node App
2:46 Connect to MySQL from Node
4:40 Basic Queries
7:24 Environment Variables
10:22 Prepared Statements
13:42 Insert Statement
17:58 Express
26:00 Error Handling
27:28 Summary
🔗Code & Resources:
sammeechward.com/connect-to-m...
🔗Express JS Crash Course
www.sammeechward.com/express-...
🔗Moar Links
My Website: www.sammeechward.com
Instagram: / meech_ward
Github: github.com/orgs/Sam-Meech-Ward

Пікірлер: 207

  • @tye-gehring
    @tye-gehring11 ай бұрын

    I've watched tons of different coding tutorials, this was by far one of my favorites. You do an amazing job and I hate to see that you haven't added anything in the last few months. Please keep it up, you are very good at explaining things.

  • @fluffybubble6872
    @fluffybubble6872 Жыл бұрын

    This is one of the best tutorials about using MySQL with Node in youtube. I really enjoyed watching your tutorial and gained a lot of usefull knowledge about topic. You really did a great job !

  • @koopa9815
    @koopa9815 Жыл бұрын

    Thanks so much! I LOVE LOVE LOVE how you explain the context of why we write the code a certain way. Helps me out so much knowing background info and prevents me from just following along too blindly!

  • @TheChad9909
    @TheChad9909 Жыл бұрын

    This tutorial is amazing! Very straightforward

  • @huyhoangngo582
    @huyhoangngo58210 ай бұрын

    I've been watching a lot of tutorials on connecting MySQL to VSCode and using ExpressJS to implement it. None of the videos gave me a clear idea of what to do. But when I watched your video, you basically made everything clear to me. Just wanted to say thanks for the instructions and keep up the good work.

  • @chriskiesel5360
    @chriskiesel53608 ай бұрын

    Fantastic! I really enjoyed this honestly, I kept pausing and rewinding the clip over and over and not because it was hard to grasp rather was your delivery, absolute fire . I am so happy for accidentally coming across your channel you're a real one Sam, Cheers.

  • @mashablair2854
    @mashablair2854 Жыл бұрын

    I love this!! especially the voice of the instructor -- I can listen to it all day! 😀 i was afraid of mysql (connecting it to some front-end code) for a long time and this is super helpful. thank you.

  • @user-pw7rk1do8r
    @user-pw7rk1do8r3 ай бұрын

    Thank god someone can actually explain this clearly, comprehensively and concisely - everything I needed to know and nothing I didn't - much appreciated mate 👍

  • @agresiv0
    @agresiv0 Жыл бұрын

    Awesome tutorial man, great explanation and good at sharing best practices, some just do stuff without explaining, thank you

  • @davidbarker7030
    @davidbarker70304 ай бұрын

    This is a really good guide to using MySQL with express. I first completed the prior tutorial, the Express JS Crash Course. I extended the work I did there during this MySQL tutorial with only a few minor tweaks - uninstalled express 4, installed express 5 beta. Used server.js instead of app.js. Had to change to use ES modules instead of commonjs, so I had to remove 'require' and use imports. Then the rest of the changes were just in database.js (in the first tutorial, it's just a hard-coded in-memory object). It works great! Thanks!

  • @DiomedesAlexanderVallejo-dx5tk
    @DiomedesAlexanderVallejo-dx5tk Жыл бұрын

    This is just a really amazing video, where someone with no idea about NodeJs can start using it with such a great database manager as mysql... GREAT JOB! I am so following you!!!

  • @HashimWarren
    @HashimWarren Жыл бұрын

    Fantastic, to-the-point tutorial. Thank you!

  • @davidmd5329
    @davidmd532911 ай бұрын

    All your tutorials are great to follow on practice without missing out............Awesome attribute you have got!!

  • @danielmadison4451
    @danielmadison44517 ай бұрын

    What is clean code? Hard to define, but you know it when you see it. THIS is CLEAN CODE. Thanks for showing all of us how it's done.

  • @nbamastermind
    @nbamastermind5 ай бұрын

    Yo, Iove your content man. You take the time to explain nuances and potential issues that may arise from certain practices such as SQL Injection. Keep up the good work, you're making a difference out here.

  • @GedasBA
    @GedasBA11 ай бұрын

    Perfect, I searched for info when I had problem related to connection and data interaction with remote MySQL DB. This explained everything in one place. Thanks!

  • @saramaqsood713
    @saramaqsood713 Жыл бұрын

    This is the only video I found that actually helped me get my backend up and running! Thank you!!

  • @Leyksnal
    @Leyksnal Жыл бұрын

    I fell inlove with the way you teach and write those lines of code, i haven't started learning SQL Database yet but you have given me heads up. Thank you

  • @luisalbertovillarortiz7424
    @luisalbertovillarortiz7424 Жыл бұрын

    Dunno How I glad I felt at the very beginning of this tutorial, ever better jajaja dunno how to describe How I felt after complete these almost 30 minutes. Just to try to be accurate, It was in-depth, updated, straightforward MySQL, Node.js and Express master Class...!!! Thank so much!! Sorry I'm not english native speaker But I did my best in order to express my self!!! In a nutshell it was spotless tutorial!!! Thanks Dude! Thanks Sam Meech-Ward!!!!!!!!

  • @kennethiho1928
    @kennethiho19286 күн бұрын

    watching this pretty late but I enjoyed every bit of it. I really love how you made the everything connect and how information can be accessed and modified through different channels. great work. Thanks for this.

  • @user-xm5lf6ei2q
    @user-xm5lf6ei2q9 ай бұрын

    Thank you for keeping it short and explaining concepts very well. I intent to use this to build on top of GraphQL

  • @thequang9234
    @thequang92349 ай бұрын

    really really nice tutorial, love that you export your query functions like that, my controllers would look so much cleaner !

  • @mykalesalad
    @mykalesalad Жыл бұрын

    Exactly the video I was looking for. Followed along and now I have a great starting point and some knowledge to make my own app. Thanks!

  • @ddlesch88
    @ddlesch8811 ай бұрын

    Thank you. This was insightful and helpful. The explanations are short and concise and gives clear directive as to why you do what you do.

  • @s1gm40
    @s1gm40Ай бұрын

    Great video. Love how you should your errors, the error message, and how to fix them. Very refreshing.

  • @lovelyalicekim
    @lovelyalicekimАй бұрын

    I really love your tutorial which is straightforward and clear. Especially mentioning like why it is the better way to write code. Super helpful!!

  • @user-ny8uh3ol3h
    @user-ny8uh3ol3h Жыл бұрын

    Thanks so much for this tutorial. I am taking my first step into development and am trying to build an app for my workplace. This has been immensely helpful.

  • @kristapskarnitis9613
    @kristapskarnitis9613 Жыл бұрын

    Nice, clean and simple code Thank you for the great tutorial!

  • @sigurdurragnarsson8735
    @sigurdurragnarsson8735 Жыл бұрын

    To the point and precise. Great Job!!

  • @khanosman7466
    @khanosman746610 ай бұрын

    Thanks for your contribution to the dev community

  • @stellarhades9517
    @stellarhades951727 күн бұрын

    Thank you so much, I couldn't find anything specific to what I am trying to do, so finding this was a godsend! Interesting ideas and ways to do this

  • @josephuzuegbu7431
    @josephuzuegbu743110 ай бұрын

    You just created something excellent in less than 30 min. Wonderful

  • @ramonwest3684
    @ramonwest36847 ай бұрын

    This cleared up a lot of issues I was having passing query results to the client, great content!

  • @Dev_Jet
    @Dev_Jet Жыл бұрын

    Dude, that tutorial was awesome! Thanks a lot for sharing the video!

  • @prayagbhatt5759
    @prayagbhatt5759 Жыл бұрын

    This was Awesome Tutorial 🚀⭐I learnt a lot of things trying out different things after what you coded and it was just so so impressive . Thank You so Much !!

  • @belvindaronedymayayakotho2862
    @belvindaronedymayayakotho28627 ай бұрын

    Thank u a lot for your help. I was looking for many weeks how to connect mysql database from node Js. Now i did it !

  • @Hemantraghav-vp3ff
    @Hemantraghav-vp3ff2 ай бұрын

    It is very helpful video for those looking for 'how to connect node.js app to Mysql ". To-the-point tutorial.

  • @rajat_171
    @rajat_1712 ай бұрын

    That's the best tutorial for which i was looking for. Understood each and every line. Thanks Sam

  • @Troglodyte2021
    @Troglodyte20212 ай бұрын

    Man, all I can say is you are such a wonderful teacher, thank you!

  • @aakashraghunathan3437
    @aakashraghunathan3437 Жыл бұрын

    Such a good video, loved your explanation and thoughts, keep up the amazing work!

  • @JesseFowlerDesigner
    @JesseFowlerDesigner6 ай бұрын

    Sam thank you! So informative and easy to follow. I couldn't find the mySQL install video in the description but I did figure it out. Still didn't know where you were running mySQL commands, I had to use MySQL Workbench.

  • @maysa7491
    @maysa7491 Жыл бұрын

    that's literally all i needed for my 20 makes project ! thank you

  • @tongliu9167
    @tongliu91676 ай бұрын

    One of the best tutorial for mysql node.js

  • @uneland
    @uneland Жыл бұрын

    Great content as always Sam, love it!

  • @DR.ID123
    @DR.ID123 Жыл бұрын

    The whole day I have watched your video and finnally solved my issue

  • @ahndeux
    @ahndeux Жыл бұрын

    This video is awesome. I wasn't able to get the async function to work properly until I installed note 5.0.0 version.

  • @sofialaas4854
    @sofialaas4854 Жыл бұрын

    Thank you! This was a really good and informative tutorial! Helped me alot!

  • @henokegezew924
    @henokegezew924 Жыл бұрын

    Sam your a genius for real I love how you make everything simple and easy to understand keep up the good work my brother

  • @SamMeechWard

    @SamMeechWard

    Жыл бұрын

    Thank you 🤗

  • @arafatsage8415
    @arafatsage84159 ай бұрын

    This is the best video on the face of this earth

  • @SyriousMedia
    @SyriousMedia Жыл бұрын

    Thank you! This was just what i was looking for!

  • @bikashkalita8712
    @bikashkalita8712 Жыл бұрын

    Thanks for the short and crisp tutorial :)

  • @williamhudson7736
    @williamhudson7736 Жыл бұрын

    Thank you thank you! I'm an experienced windows developer but have struggled to find a video that explains the detail you do so I can acutally get my apps to run. You are a great teacher!

  • @Raquelleist
    @Raquelleist2 ай бұрын

    Amazing video, this helped so much and was very easy to follow. Thank you!

  • @bigbadcatbigbcy2933
    @bigbadcatbigbcy29332 ай бұрын

    Damn first you solved my server problem and now this. this man is a node.js legend

  • @austinewell6473
    @austinewell64734 ай бұрын

    Fantastic. Very easy to follow and to the point.

  • @nielsvandervelden3063
    @nielsvandervelden3063 Жыл бұрын

    Your tutorials are fantastic! Would love to see a tutorial on AWS lambda functions and API gateway.

  • @terryyyzhang
    @terryyyzhang7 ай бұрын

    awesome!!! That was so helpful. like your teaching style

  • @raulgarciacastilla7010
    @raulgarciacastilla70107 ай бұрын

    You made so easy dude!!!! thanks for the master class ☺

  • @noir4356
    @noir4356 Жыл бұрын

    You're saving my life here. Amazing!

  • @SamMeechWard

    @SamMeechWard

    Жыл бұрын

    Who needs doctors? KZreadrs are the real life savers.

  • @CodeWithBehram7497
    @CodeWithBehram74973 ай бұрын

    The content i was looking for great video much appericiate❤

  • @casteleband6298
    @casteleband6298 Жыл бұрын

    This was exactly what I was looking for! Thanks friend 🙂

  • @dividedbyzero0
    @dividedbyzero0 Жыл бұрын

    This is an amazing tutorial, Thank you so much

  • @abeercodes
    @abeercodes10 ай бұрын

    That was a great tutorial. I learned what I looked for

  • @arindam-karmakar
    @arindam-karmakar13 күн бұрын

    Really clean, really nice!

  • @rahmounioussama1624
    @rahmounioussama162419 күн бұрын

    Thanks for the video man, it was helpful for me

  • @serious_psychologist
    @serious_psychologist Жыл бұрын

    very complete explanation, thanks a lot!

  • @19.sairoopesh10
    @19.sairoopesh104 ай бұрын

    great tutorial, thank you!

  • @alexandrprisekin6907
    @alexandrprisekin69078 ай бұрын

    Thanks! Very informative!

  • @harinath4164
    @harinath4164 Жыл бұрын

    this was exactly what I was looking for thank you

  • @cloudagnostic
    @cloudagnostic Жыл бұрын

    After watching the first 7:45 seconds, I’ve determine you’re the goat! 🐐

  • @lennartsteenberghs7608
    @lennartsteenberghs7608 Жыл бұрын

    You helped me a lot! Thanks!

  • @PureLandTourTourandTravels
    @PureLandTourTourandTravels24 күн бұрын

    This tut helped a lot.Nice💯

  • @mohitsaud2071
    @mohitsaud2071 Жыл бұрын

    Great video. Well explained Sam.

  • @rohit1kumar
    @rohit1kumar2 жыл бұрын

    Hi, Sam your videos are really helpful. Thank-you.

  • @SamMeechWard

    @SamMeechWard

    2 жыл бұрын

    You’re welcome 🤗

  • @abeehaturi650
    @abeehaturi6502 ай бұрын

    Thankyou sir loved your video! 🥰

  • @yuvrajdevnani4996
    @yuvrajdevnani49966 ай бұрын

    Thankyou man this video really helped a lot!

  • @nri_raj
    @nri_raj6 ай бұрын

    So clean code wow, subscribed your channel

  • @yangdongjun
    @yangdongjun Жыл бұрын

    Great video for mysql and express v5

  • @aysuncodes
    @aysuncodes Жыл бұрын

    clean and smart code, just perfect

  • @zeeshanzafar4545
    @zeeshanzafar45456 ай бұрын

    Thanks for saving my time

  • @samsorge27
    @samsorge27 Жыл бұрын

    Great tutorial! I'd love to watch you build a "real world project" in this style of video, handling all the problems and going in-depth. But you probably won't have the time to make such a video(-series) right?

  • @gabexd863
    @gabexd863 Жыл бұрын

    If you see this please pin it or comment and pin your comment. For anyone who gets an error at You have to write "type": "module" in package.json like he did at the beginning of the video, apparently that lets you use "await" without requring to be inside an async function. Also, async works in Express 4 as well, you don't need version 5 to use it.

  • @Fishamble

    @Fishamble

    Жыл бұрын

    Thanks. That had me confused.

  • @SchytexGraphics
    @SchytexGraphics9 ай бұрын

    Hi! Maybe you should have said from the start that this is not a beginner friendly kind of thing. Really struggled to understand anything, but that's what you get for being a beginner in this field. Will come back to this video once I get a better grasp of MySQL. Thank you for now!

  • @saadarman4718
    @saadarman47185 ай бұрын

    Great work. 👍

  • @A2_26_Tushar_kalaskar
    @A2_26_Tushar_kalaskar2 ай бұрын

    that was great class for me today

  • @khaoulaouifaya585
    @khaoulaouifaya5857 ай бұрын

    thanks you so much we love youuuu

  • @Magomed-r
    @Magomed-r10 ай бұрын

    Hi! Thanks for your content!

  • @fifilulu
    @fifilulu Жыл бұрын

    You are awesome, thank you !

  • @pasinduprabhath917
    @pasinduprabhath917 Жыл бұрын

    Very Helpful and thank you for the nice video ❤

  • @SamMeechWard

    @SamMeechWard

    Жыл бұрын

    Thank you

  • @ikhsan2652
    @ikhsan26528 күн бұрын

    amazing!! thankyouuu

  • @AzamKhan-bb7xg
    @AzamKhan-bb7xg8 ай бұрын

    Smooth ❤

  • @caracaxa1
    @caracaxa12 жыл бұрын

    Awesome video. Would like to see one using same languages plus react, and make a full app login and register users, storing the users login information on http only cookies. Show menu links if user is logged in or not.

  • @mechanicalmindset93
    @mechanicalmindset938 ай бұрын

    Great content!

  • @muckhobenho
    @muckhobenho2 ай бұрын

    Thanks so much man

  • @user-fi2up8gz2q
    @user-fi2up8gz2q29 күн бұрын

    fantastic ! clear right to the point code , thank you so much . btw how long it took to become this expert 😅 you exactly know what to do in any scenario,

  • @azizmiya
    @azizmiya Жыл бұрын

    What a great tutorial. Thanks so much. It was a humungus help Sam

  • @ethanendures
    @ethanendures Жыл бұрын

    On point, Thank God

  • @tarnuepythagorasbrobor9136
    @tarnuepythagorasbrobor9136 Жыл бұрын

    Thank you for the tutorial. Please make one for login and logout

  • @strikerwow2011
    @strikerwow201110 ай бұрын

    awesome video!

  • @exceladeniyi2511
    @exceladeniyi2511 Жыл бұрын

    Great tutorial

Келесі