With the built-in replication function of MySQL to optimize the availability of Soundbreak, we continuously play live audio and video 24 hours a day. Therefore, we cannot make convincing tests on the new replication features of MySQL. Through tests, we found that this feature can be used to maintain data synchronizatio
innodb_flush_log_at_trx_commit = 1 sync_binlog = 1 B. configuration files from the database # more my3506.cnf [mysqld] socket =/tmp/mysql3506.sock # Author: leshami port = 3506 # Blog:
3. Create a copy account
# Start an instance with port 3406 and add an account [mysql @ app ~] $ Mysqld_safe -- defaults-file =/data/inst3406/data3406/my3406.cnf [mysql @ app ~]
-distrib directory, right-select the Ubuntu terminal (open in Terminal) and proceed with the installation as a command line.Sixth step: Get root Administrator privileges Ubuntu defaults to disabling root permissions, so the first step in the installation is to get root permissions first. In the terminal input command sudo su, enter the current user password after entering the root permission,.Seventh Step: Install the command Executes the install command./vmware-install.pl and enter, the syste
important is that in the formal Replication) before the start, both services can prepare data that reflects each other. We can first export data from the source database to the backup file. Here we use the mysqldump command to lock the table before using the database on Server-1 as the source database to back up data, ensure data consistency mysql> flush tables
Problem about master/slave replication delay in mysql bitsCN.com
When I interviewed mysqldba about the master-slave replication delay in mysql, I encountered a question: describes the implementation principle of the msyql replication mechanism and how to keep dropping the
_ slave. so ';Mysql> set global rpl_semi_sync_slave_enabled = 1;Mysql> stop slave IO_THREAD; start slave IO_THREAD;You can also set global variables as follows:Set global rpl_semi_sync_master_enabled = 1Cancel plug-in loadingMysql> uninstall plugin rpl_semi_sync_master;Check whether semi_sync on the slave server is Enabled:Mysql> show global status like 'rpl _ s
/M01/24/00/wKioL1NKWlfS9YEVAAF_A1beWsM864.jpg "title=" 2.jpg " alt= "Wkiol1nkwlfs9yevaaf_a1bewsm864.jpg"/>5: Release Global lock MariaDB [(None)]> UNLOCK TABLES;6: Mount the snapshot and back up the dataMount/dev/myvg/mydata-snap/mnt-o rocp/mnt/*/tmp/mydb.back-a7: Unmount The mount and delete the snapshot.8: Stop service and simulate database corruption650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/24/00/wKioL1NKWpuwpOIGAAIC3nbl_qg894.jpg "title=" 3.jpg " alt= "Wkiol1nkwpuwpoigaaic3n
1. One months ago because I have been developing PHP site, so the Linux thrown away for a long time without touch, in recent days to pick up some of the Linux,But when I set up VM virtual machine due to the experiment done at home did not finish, copied to the USB flash drive Thinking company then do not imaging, the system is intact boot, but my eth0 nic is not:Solution, open the/etc/sysconfig/netwerk-script/ifcfg-eth0 (this path I hit the wrong hand to change)To view the configuration: Conside
[[email protected] bin]# Mysqlbinlog logbin.000002/*!40019 set @ @session. max_insert_delayed_threads=0*/;/*!50003 SET @ [Email protected] @COMPLETION_TYPE, completion_type=0*/;D elimiter/*!*/;# at 4#150511 20:57:36 server ID 1 end_log_ POS 106 Start:binlog v 4, Server v 5.1.73-log created 150511 20:57:36# warning:this binlog are either in use or were not C losed properly. BINLOG ' Mhprvq8baaaazgaaagoaaaabaaqans4xljczlwxvzwaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaezgnaagaegaeba
-binbinlog_format = MIXED #非必需relay-log = mysqld-relay-binbinlog-ignore-db = Mysqlbinlog-ig nore-db = information_schemabinlog-ignore-db = Performance_schemareplicate-wild-ignore-table = mysql.% replicate-wild-ignore-table = Information_schema.%replicate-wild-ignore-table = performance_schema.%Iv. manual synchronization of the databaseIf there is already data on master, it is necessary to synchronize the two MySQL
Tags: set nbsp host thread Sam Max master-slave copy Io_thread LinPreviously done a multi-instance MySQL on a single machine, this time separate to do, using two hosts.The host addresses used here are:master:192.168.214.135slave:192.168.214.128The two hosts already have MySQL installed, but two database data are differentMaster-slave replication roughly stepBasic
Tags: image machine cin thread statement binary script XXXXX structure1. Why do I have to copy from the Boss?1, in the business complex system, there is a scenario, there is a SQL statement need to lock the table, resulting in the temporary inability to use the Read service, then it will affect the operation of the business, the use of master-slave replication, let the main library is responsible for writing, read from the library, so that even if the
-binlog_bin_index = mysql-bin.indexsync_binlog = 1innodb_flush_log_at_trx_commit = 1innodb_support_xa = 1
Note: ensure that the server_id of the master and slave servers is unique to avoid conflicts.
NOTE: If log_bin is not specified, the host name will be used by default. As a result, once the host name changes, a problem may occur, therefore, we recommend that you specify log_bin (the relay_log of the slave server has the same problem ).
Note: sync_
The implementation of MySQL master-slave replication
1, the implementation of MySQL replication principle
MySQL supports one-way, bidirectional replication, asynchronous replication,
://www.bkjia.com
If you enable semi-synchronous replication on a running Slave, you must stop Slave I/O and enable semi-synchronization before enabling Slave I/O.
Mysql> stop slave IO_THREAD; start slave IO_THREAD;
If this is not done, Slave still replicates data asynchronously.
As you know, if you do not write the variable settings to the configuration file, the
relay log.The SQL slave thread (SQL slave thread) handles the last step of the process. The SQL 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
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.