After docker stop mysql container disappears

After recently learning to use docker install mysql, mysql docker ps -a stop I can not find the mysql

Read previous start mysql command found before the time the command is this

 docker run -it --rm --name mysql -e MYSQL_ROOT_PASSWORD=123456 -p 3306:3306 -d mysql 

Suddenly found that there is a command inside  

--rm

I guess seeing rm should be deleted related with it, and he changed the command

docker run -it --name mysql -e MYSQL_ROOT_PASSWORD=mysql -p 3306:3306 -d mysql 

Then no problem, have mercy on me before the data, but fortunately there are backup (manual funny)

 

Guess you like

Origin www.cnblogs.com/freeatalk/p/11613129.html