Master/Slave Hot Standby (automatic synchronization) configuration of MySQL in Windows

Source: Internet
Author: User
This configuration method applies to Versions later than 5.1 and is successfully configured on 5.5 (for versions earlier than 5.1, see other configuration instructions)

 

Environment Description: MASTER: 192.168.1.200slave: 192.168.1.210

 

MySQL master configuration: Configure My. ini:

 

[Mysqld] # The TCP/IP Port the MySQL server will listen onport = 3306server-id = 200log-bin = mysql-binrelay-log = relay-binrelay-log-Index = relay-bin-Index

 

* After configuration, restart the MySQL Service of the master !!!

 

// ---------------------------------------------------- MySQL slave configuration: Configure My. ini:

 

[Mysqld] # The TCP/IP Port the MySQL server will listen onport = 3306server-id = 210replicate-do-db = test

 

* After configuration, restart the MySQL service of slave !!! //--------------------------------------------------

 

Log on to slave and run the following command:

 

Mysql> stop slave; mysql> change master to master_host = '2017. 168.1.200 ', master_user = 'root', master_password = '000000'; mysql> Start slave; mysql> show slave status \ G;

 

Check whether the two items are yes and yes is normal. Slave_io_running: yesslave_ SQL _running: Yes

 

 

 

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.