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

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