Win7 MySQL master-slave configuration (same machine)

Source: Internet
Author: User

1. Master host add Slave User:

Execute Grant replication Slave,reload,super on * * to [e-mail protected] ' 127.0.0.1 ' identified by ' 123456 '

Note: This command creates a new user account backup, password 123456, and directly assigns permissions;

2. Modify Master's My.ini and restart:

Add under [mysqld]

server-id=10
Log-bin=d:\mysql-5.5\log\log-bin.log

3. Modify the slave My.ini and restart:

Add under [MySQL]

Server-id=20

Log-bin=mysql=bin

Relay-log=relay-bin

Relay-log-index=relay-bin-index

4. Execute in Slave:

Stop slave;

Change Master to master_host= ' 127.0.0.1 ', master_user= ' backup ', master_password= ' 123456 ';

Start slave;

5. Execute show slave status\g; View link status


Win7 MySQL master-slave configuration (same machine)

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.