How to configure a two-way master-slave replication server for MySQL

Source: Internet
Author: User
Welcome to the Linux community forum and interact with 2 million technical staff to enter Replicate_Ignore_Table: Role: Last_Errno: 0Last_Error: Skip_Counter: Role relay_log_space: 552Until_Condition: No

Welcome to the Linux community forum and interact with 2 million technical staff> go to networking: Networking: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 106 Relay_Log_Space: 552 Until_Condition: No

Welcome to the Linux community forum and interact with 2 million technicians>

Replicate_Ignore_Table:

Replicate_Wild_Do_Table:

Replicate_Wild_Ignore_Table:

Last_Errno: 0

Last_Error:

Skip_Counter: 0

Exec_Master_Log_Pos: 106

Relay_Log_Space: 552

Until_Condition: None

Until_Log_File:

Until_Log_Pos: 0

Master_SSL_Allowed: No

Master_SSL_CA_File:

Master_SSL_CA_Path:

Master_SSL_Cert:

Master_SSL_Cipher:

Master_SSL_Key:

Seconds_Behind_Master: 0

Master_SSL_Verify_Server_Cert: No

Last_IO_Errno: 0

Last_IO_Error:

Last_ SQL _Errno: 0

Last_ SQL _Error:

1 row in set (0.00 sec)

ERROR:

No query specified

If you need to restart the slave server, first run slave stop, then run reset slave to delete my. mysql-bin under the log_bin directory (/var/log/mysql/) in the cnf file. ", and then run the slave start command.

6. perform A test to check whether the master and slave servers are working normally. When slave is started, both servers are started. Do not close the server and restart the server, for example, after server A is started.

Insert data in server

Insert into ddgl_qdlx (qdlxmc, lxjc, qdlxbz) VALUES

('175a ', '75a', '175a ');

The corresponding record is displayed in server B.

Also insert in server B:

Insert into ddgl_qdlx (qdlx_id, qdlxmc, lxjc, qdlxbz) VALUES

('176b ', '76b', '176b ');

The corresponding record is displayed in server.

Test OK.

[1] [2]

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.