How to install MySQL in Docker ?
Table of Contents
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.