First look at what images are in this machine, and the commands are as follows: Docker images
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/82/0F/wKiom1dJYJDzNfTgAAAqY6qN28s530.png-wh_500x0-wm_3 -wmp_4-s_3636605211.png "title=" qq picture 20160528171021.png "alt=" Wkiom1djyjdznftgaaaqy6qn28s530.png-wh_50 "/>
-
download MySQL using the Docker command, such as: docker Pull mysql:5.7
650) this.width=650; src= http://s1.51cto.com/wyfs02/M01/82/0F/ Wkiom1djyq6xtpxiaacnha1_rpw428.jpg-wh_500x0-wm_3-wmp_4-s_1144364336.jpg "title=" QQ20160528171921.jpg "alt=" Wkiom1djyq6xtpxiaacnha1_rpw428.jpg-wh_50 "/>
View the Mirror library when the download is complete
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/82/0F/wKiom1dJY6iSN596AAENuEg5zy0951.jpg-wh_500x0-wm_3 -wmp_4-s_3133527414.jpg "title=" qq20160528172320.jpg "alt=" Wkiom1djy6isn596aaenueg5zy0951.jpg-wh_50 "/>
Launch our MySQL Docker container
The command is as follows: Docker run--name dbtest-p 3306:3306-e mysql_root_password=root1234-d mysql:5.7
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/82/0F/wKiom1dJZISjP2dDAACuPXCGodk256.jpg-wh_500x0-wm_3 -wmp_4-s_3747632387.jpg "title=" qq20160528172712.jpg "alt=" Wkiom1djzisjp2ddaacupxcgodk256.jpg-wh_50 "/>
Note that the container name here is: Dbtest,mysql root user password is: root1234,
Port 3306 of the host child is mapped to port 3306 of the container,
The warehouse name MySQL and tag (tag) only determine the image to be specified, in fact, if there is only one MySQL it is necessary to tag5.7
-
View all containers that have been run, such as: Docker PS
650) this.width=650; "Src=" http://s4.51cto.com/wyfs02/M00/82/0F/wKiom1dJZM3DdPNfAAAzxG-3bpw765.jpg-wh_500x0-wm_ 3-wmp_4-s_3622255172.jpg "title=" qq20160528172836.jpg "alt=" Wkiom1djzm3ddpnfaaazxg-3bpw765.jpg-wh_50 "/>
Using the Navicat connection test
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/82/0D/wKioL1dJZ6PhrBuTAAB6k8p9mNM026.jpg-wh_500x0-wm_3 -wmp_4-s_819059433.jpg "title=" qq20160528173629.jpg "alt=" Wkiol1djz6phrbutaab6k8p9mnm026.jpg-wh_50 "/>
This article is from the "Little Yang Kagoshima" blog, please be sure to keep this source http://xiaoyanger.blog.51cto.com/11634381/1784094
Centos7 using Docker to install MySQL and configure