MySQL one master multi-slave configuration

Source: Internet
Author: User

MYSQL one master multi-slave configuration

Primary server: 192.168.26.210

From server: 192.168.26.211

From server: 192.168.26.212

Operating system: centos6.6

Install MySQL: Slightly (with 5.1.73 version)

Setup profile: 192.168.26.210 (Master)

650) this.width=650; "Width=" 570 "height=" 423 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

From the server configuration file: 192.168.26.211 (from 1)

650) this.width=650; "Width=" 560 "height=" 428 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

From the server configuration file: 192.168.26.212 (from 2)

650) this.width=650; "Width=" 519 "height=" 375 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

Create a user and password on the primary server (192.168.26.210):

Grant all on * * to ' Jerry ' @ ' 192.168.%.% ' identified by ' jerrypass ';

650) this.width=650; "Width=" 572 "height=" 610 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

Execution on slave server (192.168.26.211): Change master to master_host= ' 192.168.26.210 ', master_user= ' Jerry ', master_password= ' Jerrypass ';

650) this.width=650; "Width=" 456 "height=" "The Src=", "/e/u261/themes/default/images/spacer.gif", style= "Background:url" ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

Start from server process: start slave;

650) this.width=650; "Width=" 464 "height=" 338 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

Performed on the second slave server (192.168.26.212): Change master to master_host= ' 192.168.26.210 ', master_user= ' Jerry ', master_password= ' Jerrypass ';

650) this.width=650, "width=" 466 "height=" "src=,"/e/u261/themes/default/images/spacer.gif, "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

Execute the command again to view from the status: Show slave status\g;

650) this.width=650; "width=" 428 "height=" 321 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

Execute boot from server: start slave;

show slave status\g;

650) this.width=650; "Width=" 561 "height=" 406 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

Synchronization succeeded.

Create a Database Operations test

We create a new database on the primary server (192.168.26.210) to see if the two slave servers (192.168.26.211,192.168.26.212) can successfully synchronize:

Execution: CreateDatabase Bd_jerry;

Show databases;

650) this.width=650; "Width=" 539 "height=" 390 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

View from server (192.168.26.211): show databases;

650) this.width=650; "Width=" 592 "height=" 425 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

View from server (192.168.26.212): Show databses;

650) this.width=650; "Width=" 587 "height=" 426 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

The test was successful.


This article is from the "on the Road" blog, please be sure to keep this source http://jdonghong.blog.51cto.com/3473478/1842832

MySQL one master multi-slave configuration

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.