=1, each time a self-increment operation is performed at the Master1 end, the data is increased by 2 larger than the maximum value of the current data, and is incremented by 2 numbers at a time from the 1th position after the maximum value. For example, 1,3,5,7 ... The auto_increment_increment=2,auto_increment_offset=2 will increase the data by 2 greater than the current maximum value at the Master2 end of each self-increment operation, and start at the 2nd position after the maximum value. Add
: last_sql_errno:0 Last_sql_error: Replicate_ignore_server_ids: Master_server_id:1 1 row in Set (0.00 sec) Read_master_log_pos and Exec_master_log_pos values can be assumed to be the master from synchronization success Seconds_behind_master whether the master/slave is synchronizing, whether there is delay master_log_file:mysql-bin.000002
| ZXM || 2 | King |+------+------+4 rows in Set (0.00 sec)Iv. SummaryEncounter problems1, the installation process error, unable to install mysql-server-advanced-5.6.19-1.el6.x86_64.rpm, the reason is that Redhat comes with the installation of mysql-libs-5.1.66-2.el6_3.x86_64, some files already exist, causing the installation to fail.Workaround: Remove mysql-li
structure:One-way replication: Main---fromExtend your AppChained copy:-----fromBidirectional replication: Master Radial replication: From |From5. Principle of implementationOn the master machine, the master-slave synchronization event will be written to a special log file (Binary-log), on the
mysql Simple master-slave setup and problem solvingThis week, I need to understand how MySQL sets the master-slave relationship because of my job needs, so I started to try this new thi
How to quickly configure mysql master-slave synchronization in centos
BitsCN.com installation environment
Centos 1, 5.4
Mysql 5.1.xx is directly installed using rpm
Xtrabackup 1.2.22 directly installed with rpm
1. Master:/etc/my. cnf
[Mysqld] server-id = 1 log-bin innodb_f
Mysql 5.7 docker master-slave replication architecture setup, mysqldockerEnvironment version: MySQL: 5.7.13Docker: 1.11.2CentOS: 7.11. install two MySQL instances on two physical machines. The command is as follows:Docker pull
thread:connected to master ' [email protected]:3307 ', replication started in log ' Mysql-bi n.000006 ' at position 316
Note: All data from the stop period is re-added from the library at the point in time. 6. Perform exception testing:Stop replication from libraries mysql3308 and mysql3309, and log cleanup for the main library:
Flush logsDelete from Sky where id= ' 2000 ';Purge binary logs to
Tags: style blog color io os using AR for fileModify Master First (10.1.123.197) is configured in the MY.CNF[mysqld]The following additions are added to theLog-Bin=Mysql-binLog-Bin-Index=Mysql-Bin.IndexServer-Id= 1Sync_binlog=1Binlog_format=mixed then specifies the database to be synchronized and ignores the database that does not need to be synchronized Binlog-D
Simple setup of MySQL master-slave architecture 192.168.190.128 192.168.190.129master ---- slaveslave ---- master1. Configure on master128
Simple construction of MySQL master-slave for
library.Execute the Stop slave io_thread;show processlist\g from the library, until you see the have read all relay log, indicating that the import is complete from the library.mysql> stop slave Io_thread;Mysql> Show Processlist\g5.3 New Main Library operations 新主库的检查? In the data directory of the new host, delete the Master.info,relay-log.info two file
Simple setup of master-slave MySQL
192.168.190.128 "====" 192.168.190.129Master ---- slaveSlave ---- master1. Configure the my. cnf file on the master 128 and add the following parameters:Server-id = 1Log-bin = mysql-binLog-salve-
:86400Master_bind:Last_io_error_timestamp:Last_sql_error_timestamp:MASTER_SSL_CRL:Master_ssl_crlpath:Retrieved_gtid_set:Executed_gtid_set:auto_position:0replicate_rewrite_db:Channel_name:Master_tls_version:1 row in Set (0.00 sec)The user is given permission by mistake, so the user is deletedmysql> drop user [email protected] '% ';7, two node verificationMaster node Configuration verification:mysql> CREATE DATABASE ceshi_db;Query OK, 1 row Affected (0.00 sec)
Label:The MySQL master and slave feature is set on CentOS 6.5 and recorded. Server 1 (primary)ip:192.168.137.144System version: CentOS 6.5MySQL version: MySQL 5.5 Server 2 (from)ip:192.168.137.185System version: CentOS 6.5MySQL version: MySQL 5.5 The system version and
=start=
Reason:
Work needs, learning needs.
Body:
MySQL Master and slave architecture:
By a MySQL instance as the main library, accept read and write requests, another one or more MySQL instances through the MySQL replication
Master MySQL Settings
1, edit the main MySQL server MySQL configuration file my.cnf, under [mysqld] Add the following parameters:
Log-bin=mysql-bin//open MySQL binary log
Server-id=1//server ID cannot be duplicated
BINLOG-DO-D
Installation Environment
CentOS 5.4
MySQL 5.1.xx with rpm direct installation
Xtrabackup 1.2.22 with RPM direct installation
Copy Code code as follows:
[Mysqld]
Server-id = 1
Log-bin
Innodb_flush_log_at_trx_commit=1
Sync_binlog=1
Datadir=/var/lib/mysql
Character-set-server=utf8
init_connect= ' SET NAMES UTF8 '
Set the default character set for UTF8, you can choose this
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.