CENTOS6-based mysql5.7.13 master-Slave Deployment (iii)

Source: Internet
Author: User

CENTOS6-based mysql5.7.13 master-Slave Deployment (iii)


Master-Slave testing

  1. Log in (main) MYSQL1

    [Email protected] ~]# mysql-uroot-p123456

    mysql> unlock tables; #解锁, locking of the table corresponding to the previous chapter

    mysql> use Shiyan;

    Mysql> Show tables;

    650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/98/E1/wKiom1lBVPeAD5SsAAAe_T3AggA102.png "title=" My. PNG "alt=" Wkiom1lbvpead5ssaaae_t3agga102.png "/>

    650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/98/E2/wKiom1lBcHyBeh-KAAANrgXRB2c817.png "title=" MySQL . PNG "alt=" Wkiom1lbchybeh-kaaanrgxrb2c817.png "/>

    Delete one of the tables:

    mysql> drop table engine_cost;

    650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/98/E2/wKiom1lBcSDwHDGuAAAQEjyRQF8132.png "title=" MySQL . PNG "alt=" Wkiom1lbcsdwhdguaaaqejyrqf8132.png "/>

  2. Log in (from) mysql2

    [[email protected] ~]# mysql-uroot-p123456

    mysql > Use Shiyan;

    mysql> show tables;

    650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/98/E2/wKiom1lBcZTjmVZ_ Aabf637lu34747.png "title=" MySQL. PNG "width=" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:230px; "alt=" Wkiom1lbcztjmvz _aabf637lu34747.png "/>

    Obviously no engine_ Cost because the main MySQL has been removed.

  3. Create a table on master MySQL test

    mysql> use Shiyan;

    Mysql> Create tables Test (ID int (3), name char (10));

    650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/98/E2/wKioL1lBc9Ki9EAvAAAvpS5i-kI291.png "title=" MySQL . PNG "alt=" Wkiol1lbc9ki9eavaaavps5i-ki291.png "/>

    Mysql> Show tables;

    650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/98/E2/wKiom1lBdDqQggQyAAAfRC43nBY010.png "title=" MySQL . PNG "alt=" Wkiom1lbddqqggqyaaafrc43nby010.png "/>

    Note: As you can see, our new test table is already in the Shiyan library!

    For more information on MySQL database operations, please see: http://wutengfei.blog.51cto.com/10942117/1905963

  4. View (from) whether a test table is generated on the MYSQL2

    650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/98/E2/wKiom1lBdQfQiXgmAACl27AI0EE835.png "title=" MySQL . PNG "alt=" Wkiom1lbdqfqixgmaacl27ai0ee835.png "/>

    As you can see, there is a test table generated in the MYSQL2 in the Shiyan library!

    MySQL's master-slave deployment is now complete!

This article is from the "Hand of the Paladin Control" blog, please make sure to keep this source http://wutengfei.blog.51cto.com/10942117/1936906

CENTOS6-based mysql5.7.13 master-Slave Deployment (iii)

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.