MySQL Cascade replication Configuration

Source: Internet
Author: User

Environment:

10.0.0.51/172.16.1.51 mysql01 main Repository CentOS 7.2

10.0.0.52/172.16.1.52 mysql02 relay from the library CentOS 7.2

10.0.0.53/172.16.1.53 mysql03 from the library CentOS 7.2


MYSQL01 configuration:

[Mysqld]
Bind-address = 172.16.1.51
Innodb_buffer_pool_size = 512M

Log_bin=/application/mysql/logs/mysql-bin
Expire_logs_days=7

server_id = 1
Character-set-server=utf8
Key_buffer_size = 16M
Basedir =/application/mysql
DataDir =/application/mysql/data/
Slow-query-log = On
Log_queries_not_using_indexes = On
Slow-query-log-file =/application/mysql/slow.log
Min_examined_row_limit = 800
innodb_flush_log_at_trx_commit=2

Sql_mode=no_engine_substitution,strict_trans_tables
[Mysqld_safe]
Log-error =/application/mysql/logs/oldboy.err


MYSQL02 configuration:

[Mysqld]
Bind-address = 172.16.1.52
Innodb_buffer_pool_size = 512M
Expire_logs_days=7
Log-slave-updates=1
Log_bin=/application/mysql/logs/mysql-bin
server_id = 2
Slave-skip-errors = 1032,1062,1007

Sql_mode=no_engine_substitution,strict_trans_tables
[Mysqld_safe]
Log-error =/application/mysql/logs/oldboy.err


MYSQL03 configuration:

[Mysqld]
Bind-address = 172.16.1.53
server_id = 3
Innodb_buffer_pool_size = 512M
Slave-skip-errors = 1032,1062,1007
Log_bin =/application/mysql/logs/oldboy-bin

Sql_mode=no_engine_substitution,strict_trans_tables
[Mysqld_safe]
Log-error =/application/mysql/logs/oldboy.err


Attention:

MYSQL02 also want to configure Binlog, otherwise, MYSQL03 will report:

2017-10-25 19:21:20 2352 [ERROR] Error reading packet from server: Binary log was not open (server_errno=1236)
2017-10-25 19:21:20 2352 [ERROR] Slave I/o: Got fatal ERROR 1236 from master when reading data from binary log: ' binary lo G is not open ', error_code:1236
2017-10-25 19:21:20 2352 [Note] Slave I/O thread exiting, read up to log ' mysql-bin.000001 ', position 120

Such a mistake.

This article is from the "Little Fat Blog" blog, please be sure to keep this source http://4044619.blog.51cto.com/4034619/1975951

MySQL Cascade replication 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.