
For this tutorial, we will use an existing API with Node.js and MySQL which will replace the remote MySQL with a local MySQL running with Docker and Docker Compose.A general understanding of how relational databases work, specifically MySQL will be advantageous.Any prior information about Docker-compose will be very useful, we will use docker-compose version 1.29.2, build 5becea4c in the examples.In the examples, we will use Docker version 20.10.10, build b485636 on a Mac. Basic knowledge of Docker and related commands like docker build, run, execute, etc will be useful for this guide.

Prerequisites #īefore we get our hands dirty with some code and CLI commands, below are some good to have prerequisites: In the next section, we will list out some good to have things prior to jumping into the code to run MySQL with Docker. To know the above reasons in a bit more detail please do read the why use docker post.
#Running mysql in docker on mac software
Usually with docker, if it runs on your machine it will run on another software engineer’s machine, on a staging environment, and on production too, given some compatibility is maintained.

#Running mysql in docker on mac how to
In this tutorial, we will detail how to use MySQL with Docker and docker-compose step-by-step keeping things easy to comprehend. Using MySQL with Docker and docker-compose makes it very easy and fast to test out any changes in any application using MySQL as the database.

MySQL is one of the most popular relational databases of all time.
