the event from the relay log, replays the event, and updates the slave data so that it is consistent with the data in the master. As long as the thread is consistent with the I/O thread, the relay log is usually located in the OS cache, so the overhead of the relay log is very small.In addition, there is also a working thread in the master: like other MySQL connections, opening a connection in the master will also enable the master to
Tags: start conflict shel logic based on how run Inno is implemented1 Replication Overview 1.1 Replication-Resolved issues Data replication technology has some of the following features: (1) Data distribution (2) Load balancing (load Balancing) (3) Backup (4) High availability (Hi availability) and fault tolerance 1.2
Mysql master-slave replication technology (test) bitsCN.com
Mysql master-slave replication technology (test)
Start configuration:
Step 1: Create a replication account
Each slave uses a standard
First, IntroductionIn the master-slave copy of the previous article: http://www.cnblogs.com/lay2017/p/9043985.htmlWe learned that MySQL writes logs through master, slave reads and executes the log content to achieve slave data consistent with master. So based on this principle, we can realize the replication function of two master.Broadly as follows:1, both master open Log-bin write log2, ID to repeat3. Con
later.Confirm the password again.At this point, the master-slave server MySQL installation completedThird, build MySQL master-slave replicationHere is the principle of master-slave replication, is based on the MySQL log files, the main server's MySQL operation log files sen
-log;
After the slave IO process receives the information, the received log content is added to the end of the Relay-log file on the slave side, and the file name and location of the Bin-log read to the master side are recorded in the Master-info file. In order to be able to tell Master clearly at the next reading, "I need to start from somewhere in the Bin-log log content, please send me";
Slave's SQL process detects new additions to the rela
following steps are exactly the same as the steps we have made in the second combat, just copy it. I will not dwell on it. The completion of the above adjustment is only a two-master+slave replication architecture switch completion. Fourth combat: On-line system environment re-tune the Cascade replication architecture back to a master multi-slave architecture The original schema is: a->b->c "Cascade
receives the information, the received log content is added to the end of the Relay-log file on the slave side, and the file name and location of the Bin-log read to the master side are recorded in the Master-info file. In order to be able to tell Master clearly at the next reading, "I need to start from somewhere in the Bin-log log content, please send me";
Slave's SQL process detects new additions to the relay-log, and immediately resolves the
Tags: group replication"MySQL Group Replication"The group replication is an open source plugin developed by MySQL and is a tool for implementing MySQL's highly available clusters. The first GA version is officially released in MySQL5.7.17; To use group
](6). Transfer backup to from DB server(7). Start the database
The following steps for a one-way master and subordinate to build success, want to build a two-way master and subordinate needs of the steps:
(1). Log in to the database, specify the address of the primary DB server, user, password and other information [This step is only bidirectional master and subordinate, need]
(2). Turn on sync, view status
2. Configuration from the DB server
(1)
Three modes of MySQL replicationMySQL currently has three replication modes: asynchronous mode, semi-synchronous mode, and group copy mode, first understand how the three modes work.1. MySQL Asynchronous Replication (asynchronous replication)Asynchronous
1. Replication overview1.1, Replication solution of the problem data replication technology has the following features: (1) data distribution (2) load balancing (load Balancing) (3) Backup (4) High availability (Hi availability) and fault tolerance1.2. How replication works from a high level,
I. Replication architecture derivative historyBefore we talk about this feature, let's take a look at MySQL's replication architecture derivation history.In 2000, the MySQL 3.23.15 version introduced the replication. As a quasi-real-time synchronization method, replication i
thread reads events from the log and replays the events in them to update the slave data so that it is consistent with the data in master. As long as the thread is consistent with the I/O thread, the trunk log is typically located in the OS cache, so the overhead of the trunk log is minimal.In addition, there is a worker thread in master: As with other MySQL connections, slave opening a connection in master will also cause master to
slave server of mysql.
1. configure the mysql master server
Edit/etc/my. cnf and provide the following configuration
Log_bin = index
Server_id = 1
Authorize on the master server
# Mysql> grant replication slave, replication client on user @ '192. 168.1.142 'identified by
Key:Seconds_Behind_Master:NULL Master_ssl_verify_server_cert:no last_io_errno:1236 Last_io_error:got fatal Error 1236 from master while reading data from binary log: ' Client requested Master to start Replication from impossible position; The last event is read from './mysql-bin.000417 ' in 228308262, the last byte read is read from './
MySQL two-way master-slave replication server configuration method 1. environment description
Server A (master) 192.85.1.175Server B (slave) 192.85.1.176
Mysql version: 5.1.61
System version: System OS: ubuntu 10.10X86
(System installation and data environment setup, omitted)
2. create a synchronization User:
Run the following command in service B:
grant
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.