Get the App
SLTechnology News&Howtos  ›  Database  › 

What is the master-slave deployment of mysql5.7.13 based on centos6?

Shulou Source: shulou.com Published: 2022-05-31 17:24:53 10月03日 Update

What is the master-slave deployment of mysql5.7.13 based on centos6? I believe many inexperienced people are at a loss about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Mysql5.7.13 Master-Slave deployment based on centos6

Master-slave test

Log in to (master) mysql1

[root@mysql1] # mysql-uroot-p123456

Mysql > unlock tables; # unlock, corresponding to the locking of the table in the previous section

Mysql > use shiyan

Mysql > show tables

Delete one of the tables:

Mysql > drop table engine_cost

Log in to (from) mysql2

[root@mysql2] # mysql-uroot-p123456

Mysql > use shiyan

Mysql > show tables

Description:

There is obviously no engine_cost because it has been deleted on the main mysql.

Create a table test on the main mysql

Mysql > use shiyan

Mysql > create tables test (id int (3), name char (10))

Mysql > show tables

Description: you can see that our new test table is already in the shiyan library!

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

Check to see if a test table is generated on (from) mysql2

As can be seen from the above figure, there is a test table generation in the shiyan library in mysql2!

At this point, the master-slave deployment of mysql has been completed!

After reading the above, have you mastered the method of centos6-based mysql5.7.13 master-slave deployment? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Linux NVidia Shulou Technology macOS