0:00 / 0:00
- Recommended by 3 people: 3 in engineering communities.
- A classic. People kept recommending it from 2017 to 2022.
- Presented by Brad Traversy
- May be out of date. The tools, versions or practices it shows have likely moved on.
Beginner. No background in the topic needed.
542K views9 years ago3 recommendations
Databases and dataWeb developmentNode.js, Deno and BunMySQLSQL
Brad Traversy demonstrates how to connect a Node.js and Express application to a MySQL database and perform basic CRUD operations.
In this quick guide I will show you how to use MySQL along with Node.js. This is something I am constantly asked by LAMP stack devs wanting to learn Node.js. We will be using the MySQL JavaScript client along with Express and Node. CODE: Code for this video traversymedia.com/downloads/nodemysql.zip BECOME A PATRON: Support me directly for even $1 per month patreon.com/traversymedia ONE TIME DONATIONS: paypal.me/traversymedia FOLLOW TRAVERSY MEDIA: facebook.com/traversymedia twitter.com/traversymedia instagram.com/traversymedia EDUONIX COURSES: Please use affiliate links from website below traversymedia.com/eduonix-coursesWhy it's here
3 people recommend thisWhat people say. Recommended as a classic, easy-to-follow guide for integrating MySQL with Node.js.
u/paperjace_v2in r/node • Recommends
On “Starting to learn Node.js”
These were in the first five results after Googling "node is MySQL" and they seem to be exactly what you asked for.
Node.js MySQL - W3Schools https://www.w3schools.com/nodejs/nodejs_mysql.asp
How to use MySQL with NodeJS link to this video
Using MySQL with NodeJS
link to this video
You might use Express in these and that's fine. Express is a very simple and easy to use web server framework for NodeJS. The tutorial will probably use it so you can see your MySQL data displayed in the browser.
u/aq-anonin r/node • Recommends
On “I have been hitting a wall trying to connect a server to mysql database”
I had the same error "Error: ER\_ACCESS\_DENIED\_ERROR: Access denied for user 'root'@'localhost' (using password: NO)" on Linux Mint. The fix for me was opening the mysql workbench as root. Got the error above when I opened mysql workbench as a standard user.
These links helped me: [video In the video itself has another link to a mysql documentation that shows how to set it up correctly. Wishing you luck! :)