How to install MySQL in Docker ?

How to install MySQL in Docker ?

How to install MySQL in Docker ?

Installing Particular Version

[code]
sudo docker pull mysql/mysql-server:5.7
[/code]

 

Installing Latest Version

[code]
sudo docker pull mysql
[/code]

 

Running MySql Docker Image:

[code]
sudo docker run –name mysqlcname -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 –restart always -d mysql
[/code]

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

 

 

Docker useful commands for Beginners:

You can also find other useful docker commands here.

914 total views, 5 views today

Leave a Reply

Your email address will not be published. Required fields are marked *

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