Centos7 using Docker to install MySQL and configure

Source: Internet
Author: User
Tags docker ps docker run

  1. 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 "/>

  2. 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 "/>

  3. 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 "/>

  4. 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

  5. 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 "/>

  6. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.