CENTOS6-based mysql5.7.13 master-Slave Deployment (iii)
Master-Slave testing
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 "/>
-
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.
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
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)