From the course: Databases for Node.js Developers
Unlock this course with a free trial
Join today to access over 24,400 courses taught by industry experts.
Setting up MySQL with Docker - Node.js Tutorial
From the course: Databases for Node.js Developers
Setting up MySQL with Docker
- [Instructor] To set up MySQL, we'll use Docker to download and run a container. If you already have MySQL installed on your system, you can skip this step. We've already installed Docker in a previous video. And first, we make sure Docker is running. So I check this by clicking on the Docker icon, and if it says running, you're good to go. Now, I am already in my terminal of my system, and of course, your mileage may vary depending on your operating system. But here on my make I have the terminal where I now write docker pull mysql to download this image from Docker Hub. Once the image is downloaded, we can now start a new container with this command, I run docker run --name, so this is how we will name our container, mysql. And then there is something that we did not have in MongoDB. We have to provide a password for the root user in MySQL. And this is an environment variable, so it's -e MYSQL_ROOT_PASSWORD equals. And I will use secret here, and you should do the same because for…
Contents
-
-
-
-
-
-
(Locked)
Using MySQL for our users and orders1m 8s
-
(Locked)
Setting up MySQL with Docker2m 49s
-
(Locked)
Exploring MySQL with MySQL Workbench1m 57s
-
(Locked)
Introducing Sequelize1m 51s
-
(Locked)
Setting up the database connection7m 43s
-
(Locked)
Designing the database structure2m 1s
-
(Locked)
Creating a user model for Sequelize7m 47s
-
(Locked)
Creating the order models for Sequelize11m 56s
-
(Locked)
Loading and syncing the models13m 5s
-
(Locked)
Creating, updating and deleting users with Sequelize12m 52s
-
(Locked)
Securing credentials with password hashing7m 2s
-
(Locked)
Implementing the user login9m 15s
-
(Locked)
-
-
-