• 周六. 10 月 12th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

Deploying MySQL on docker

King Wang

1 月 3, 2022

First step   see docker state  

systemctl status docker

 

The second step   Search the image library for mysql   

 docker search mysql

 

Official version , Default latest

 

 

The third step is to pull the image

 docker pull mysql

 

 

 

 

Step four   Download successful

 

Step 5 check the image

 

Step six     Create a folder , Check to see if there is mysql Boot or port usage

 

 

Step seven   perform docker Deploy

 

docker run -id \
>  -p 3306:3306 –name= mysql  -v $PWD/conf.d : /etc/mysql/conf.d  -v  $ PWD/logs : /logs   -v $PWD /data: /var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456   mysql

 

 

 

I don’t know why I can’t write by myself

docker run -p 3306:3306 –name my-mysql  -e MYSQL_ROOT_PASSWORD=123456 -d mysql

 

 

 

 

Step eight , Let go of linux port

 

 

 

 

发表回复