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
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.
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 !
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!
This tutorial is amazing! Very straightforward
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.
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.
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.
Thank god someone can actually explain this clearly, comprehensively and concisely - everything I needed to know and nothing I didn't - much appreciated mate 👍
Awesome tutorial man, great explanation and good at sharing best practices, some just do stuff without explaining, thank you
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!
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!!!
Fantastic, to-the-point tutorial. Thank you!
All your tutorials are great to follow on practice without missing out............Awesome attribute you have got!!
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.
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.
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!
This is the only video I found that actually helped me get my backend up and running! Thank you!!
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
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!!!!!!!!
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.
Thank you for keeping it short and explaining concepts very well. I intent to use this to build on top of GraphQL
really really nice tutorial, love that you export your query functions like that, my controllers would look so much cleaner !
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!
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.
Great video. Love how you should your errors, the error message, and how to fix them. Very refreshing.
I really love your tutorial which is straightforward and clear. Especially mentioning like why it is the better way to write code. Super helpful!!
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.
Nice, clean and simple code Thank you for the great tutorial!
To the point and precise. Great Job!!
Thanks for your contribution to the dev community
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
You just created something excellent in less than 30 min. Wonderful
This cleared up a lot of issues I was having passing query results to the client, great content!
Dude, that tutorial was awesome! Thanks a lot for sharing the video!
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 !!
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 !
It is very helpful video for those looking for 'how to connect node.js app to Mysql ". To-the-point tutorial.
That's the best tutorial for which i was looking for. Understood each and every line. Thanks Sam
Man, all I can say is you are such a wonderful teacher, thank you!
Such a good video, loved your explanation and thoughts, keep up the amazing work!
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.
that's literally all i needed for my 20 makes project ! thank you
One of the best tutorial for mysql node.js
Great content as always Sam, love it!
The whole day I have watched your video and finnally solved my issue
This video is awesome. I wasn't able to get the async function to work properly until I installed note 5.0.0 version.
Thank you! This was a really good and informative tutorial! Helped me alot!
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
Жыл бұрын
Thank you 🤗
This is the best video on the face of this earth
Thank you! This was just what i was looking for!
Thanks for the short and crisp tutorial :)
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!
Amazing video, this helped so much and was very easy to follow. Thank you!
Damn first you solved my server problem and now this. this man is a node.js legend
Fantastic. Very easy to follow and to the point.
Your tutorials are fantastic! Would love to see a tutorial on AWS lambda functions and API gateway.
awesome!!! That was so helpful. like your teaching style
You made so easy dude!!!! thanks for the master class ☺
You're saving my life here. Amazing!
@SamMeechWard
Жыл бұрын
Who needs doctors? KZreadrs are the real life savers.
The content i was looking for great video much appericiate❤
This was exactly what I was looking for! Thanks friend 🙂
This is an amazing tutorial, Thank you so much
That was a great tutorial. I learned what I looked for
Really clean, really nice!
Thanks for the video man, it was helpful for me
very complete explanation, thanks a lot!
great tutorial, thank you!
Thanks! Very informative!
this was exactly what I was looking for thank you
After watching the first 7:45 seconds, I’ve determine you’re the goat! 🐐
You helped me a lot! Thanks!
This tut helped a lot.Nice💯
Great video. Well explained Sam.
Hi, Sam your videos are really helpful. Thank-you.
@SamMeechWard
2 жыл бұрын
You’re welcome 🤗
Thankyou sir loved your video! 🥰
Thankyou man this video really helped a lot!
So clean code wow, subscribed your channel
Great video for mysql and express v5
clean and smart code, just perfect
Thanks for saving my time
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?
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
Жыл бұрын
Thanks. That had me confused.
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!
Great work. 👍
that was great class for me today
thanks you so much we love youuuu
Hi! Thanks for your content!
You are awesome, thank you !
Very Helpful and thank you for the nice video ❤
@SamMeechWard
Жыл бұрын
Thank you
amazing!! thankyouuu
Smooth ❤
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.
Great content!
Thanks so much man
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,
What a great tutorial. Thanks so much. It was a humungus help Sam
On point, Thank God
Thank you for the tutorial. Please make one for login and logout
awesome video!
Great tutorial