How to install MySQL in Docker ?

How to install MySQL in Docker ?

Installing Particular Version

sudo docker pull mysql/mysql-server:5.7


Installing Latest Version

sudo docker pull mysql


Running MySql Docker Image:

sudo docker run --name mysqlcname -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 --restart always -d mysql

-d => to start it automatically when the server started.



Docker useful commands for Beginners:

You can also find other useful docker commands here.

635 total views, 7 views today

About Mirthbees 679 Articles
Blogger, Innovator, Developer and Enterpreneur. Founder of GuruRecharge, Readymade online recharge script. Lead Developer in

Be the first to comment

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.