How to run MySQL in a Docker container!

Code Bear February 23, 2025
Video Thumbnail
Code Bear Logo

Code Bear

View Channel

About

Welcome to our YouTube channel, where we unravel coding mysteries and explore JavaScript, Python, AI, and Data Science. From beginner tutorials to advanced projects, we cover it all. Discover the power of JavaScript in web development, Python's versatility, and the world of AI and data analysis. Let's code, create, and innovate together! Mail : [email protected]

Video Description

In this video, I’ll show you how to set up and run MySQL inside a Docker container from scratch. Whether you’re a beginner or looking for a quick reference, this tutorial will guide you through every step. 🔥 What You’ll Learn: ✅ How to pull the MySQL Docker image ✅ How to run the container with environment variables ✅ How to map ports for external access ✅ How to check running containers with docker ps ✅ How to access MySQL inside the container 📌 Commands Used in This Video: 1️⃣ Pull MySQL Image: docker pull mysql 2️⃣ Run MySQL Container: docker run --name my-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -p 3333:3306 -d mysql:latest 3️⃣ Check Running Containers: docker ps 4️⃣ Access MySQL Inside Container: docker exec -it (container_id) sh mysql -p Install docker on windows : https://youtu.be/ZyBBv1JmnWQ?si=Q7A4LpD0CZvm0Wpy Install docker on mac :https://youtu.be/uDkf1fSPlYQ?si=b3FduTL2h4bqn4Ff

You May Also Like