首页 > 数据库 >docker搭建mysql

docker搭建mysql

时间:2022-09-28 22:41:54浏览次数:58  
标签:container name -- 5.5 mysql docker 搭建

下载mysql镜像

[root@localhost ~]# docker pull mysql:5.5.59

 

创建mysql容器

[root@localhost ~]# docker run -itd --name mysql -p 3309:3306 --restart=always -e MYSQL_ROOT_PASSWORD=123456 mysql:5.5.59
-i,-interactive          Keep STDIN open even if not attached
-t,--tty Allocate a pseudo-TTY
-d, --detach Run container in background and print container ID
--name string Assign a name to the container
-p,--publish list Publish a container's port(s) to the host
--restart string Restart policy to apply when a container exits (default "no")
-e ,--env

 



标签:container,name,--,5.5,mysql,docker,搭建
From: https://blog.51cto.com/u_472169/5721092

相关文章