master slaveMysql software can be downloaded in the http://www.mysql.com [/, source code or rpm package can be, because RHEL6 comesMysql software package, directly install yum.# Yum install mysql-server-yMaster server Configuration1) configure the/etc/my. cnf configuration fileAdd parameters under [mysqld]Log-bin = mysql-bin # Start the binary log systemBinlog-do-db =
the semisync_slave * file to the plugins folder of all slave databases.
Next, execute the install plugin command on the master database and slave database to load the plug-in.
Mysql> install plugin rpl_semi_sync_master SONAME "semisync_master.so ";
Execute from database
Mysql> install plugin rpl_semi_sync_slave SONAME "semisync_slave.so ";
View the plug-in installation status:
Go to the mysql homepage and cover all the articles about how good mysql 5.6 is. Later, I browsed the 5.6 update description, saying that replication was enhanced, and some people tested to enable replication, which had little impact on performance. Unlike before, the impact on performance was obvious. But better perfo
Many people will build MySQL master-slave framework, but many people do not really understand the basic use of synchronization, synchronization of the basic principles, as well as when master and slave synchronous disconnection after the processing and causes the master and slave out of sync, and so on, when you know these things, For MySQL master and slave Some common problems, also can easily solve it, an
Master Server (default)
# Binary logging is required for replication
Add the following content:
Log-bin =/var/log/mysql/updatelog
Server-id = 1
Binlog-do-db = test
Binlog-ignore-db = mysql
Restart MySQL and create a MySQL account
Mysql replication heartbeat sometimes encounters such a fault during MySQL master-Slave replication: Slave_IO_Running and Slave_ SQL _Running on Slave are both Yes, and Slave_ SQL _Running_State displays Slave has read all relay log; waiting for the slave I/O thread to update it, it seems that the status is normal, but
1. Overview of Replication
1.1 problems solved by ReplicationData replication technology has the following features:(1) Data Distribution(2) load balancing)(3) backup(4) high availability and fault tolerance
1.2 How replication worksFrom a high-level perspective, replication is divided into three steps:(1) The master
Common topology of MySQL ReplicationThe replication architecture has the following basic principles:(1) Each slave can have only one master;(2) Each slave can have only one unique server ID;(3) Each master can have many slave instances;(4) If you set log_slave_updates, slave can be the master of other slave, thus spreading master updates.
MySQL does not support m
A scene demandMulti-source replication version 5.7, target host 5.6.21Some databases of 4 DB machines require a data summary for a linked table queryTwo to build1 export the corresponding destination libraryMysqldump-uuser-ppassword--master-data=2--single-transaction--databases--add-drop-database dbname >dbname.sql2 Import the corresponding destination library to the multi-source replication machineNote Ver
Tags: Step five completeMySQL5.6 Master-slave replicationFive steps to complete MySQL master-slave replication1./ETC/MY.CNF configuration of master and slave server, set unique ID to enable binary log.2. Create a master-slave copy of the account and authorize replication slave permissions.3. Query the status of master to obtain the primary server binary log information.4. Configure the server to connect to
This article mainly introduces the MySQL database replication method, and uses the common mysqldump tool. if you need it, you can refer to MySQL replication, which means to copy data from a node (master) copy to another node (slaves). of course, the method varies depending on the application architecture. the
MySQL master-master replication, online table structure modification has always been to think that the dual-master architecture can solve the mysql table online DDL requirements, but there is no practical test experience. Later I found that there were still problems with my thoughts. Here is a
In Soundbreak, we play live audio and video continuously 24 hours a day, so we cannot make a convincing test of the new replication feature of MySQL. Through tests, we found that this feature can be used to maintain data synchronization with the backup database server, so that when the master server fails to process for some reason, it can use the backup machine
From serviceThe time interval between the data and the primary server.5. Test: Create a table or database on the primary service to see if you have the same tables and databases on the server.If so, the master-slave replication is successfully built.############ #安全 ############# #阻止写从服务器1. Modify/ETC/MY.CNF[Mysqld]Read-only = 1 # This option works only for normal users and is not valid for users with supe
Analysis on master-slave replication process of MySQL server bitsCN.com
The master-slave replication of the MySQL server is divided into two situations: the MySQL version of the slave server in the replication structure is the sam
Tags: MGR build test group replication for MySQL Let's talk about the various forms of database replicationAsynchronous Replication Mode , the transaction generated binlog,slave on Master is received on the local relaylog by connecting the contents of master Fetch Binlog, and then apply the corresponding transaction,
Tags: server database binary SQL statement master
What is master-slave replication:By copying data from one of the MySQL hosts to a different host, one server acts as the primary server (master) while one or more other servers act as slave servers (slave). When replicating, all writes to the data table must be performed on the primary server. Otherwise, because the primary server does not synchronize data from the server, it can cause master-slave
state, the SQL thread is responsible for reading the data in the relay log (Relay-log) and converting it to a SQL statement applied to the from database, with a state of Yes indicating that the SQL thread is working properly. Seconds_behind_master:0, this is the number of seconds from the Cubby Main library delay during the copy process, this parameter is important, but the enterprise is more accurate to determine the master-slave replication delay m
.000028Slave_io_running:yesSlave_sql_running:yesReplicate_do_db:oceanreplicate_ignore_db:Replicate_do_table:Replicate_ignore_table:Replicate_wild_do_table:Replicate_wild_ignore_table:last_errno:0Last_error:skip_counter:0.....6. Test Master and slaveInsert a record in the Ocean database in master:Mysql>use Ocean;Mysql>insert into test1 values (2, ' Lisi ');See if Oceandb has a new record generated in slave.R
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.