Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Percona MySQL 5.6 semi-synchronous replication     - Generate two-dimensional code parsing code Java (Programming)

- How to determine whether the Linux server was hacked (Linux)

- Windows 7 hard disk to install Ubuntu 14.10 (Linux)

- Vmstat command Linux Performance Monitoring (Linux)

- Redis Linux system installation guide (Database)

- Configuring a Linux operating system security management services (Linux)

- CentOS 6.6 compile and install phpMyAdmin configuration PostgreSQL9.4.1 (Database)

- Shell Programming points to note about the function (Programming)

- Docker installation under CentOS7 (Linux)

- Confrontation dragged Library - Web front-end encryption slow (Linux)

- JavaScript original values and complex values (Programming)

- How to use SVN to manage our source code (Server)

- Linux GCC 5.1.0 compiler installation (Linux)

- PHP loop reference caused strange problems (Programming)

- Examples of RAID levels and achieve Operational Details (Linux)

- Recover accidentally deleted Nginx logs (Server)

- Linux system started to learn: how to view the Linux thread of a process (Linux)

- Redhat Close SELinux correct step (Linux)

- CentOS 7 x64 compiler installation Tengine 2.0.3 Comments (Server)

- Production environment Linux bonding method standby mode slave card switch (Server)

 
         
  Percona MySQL 5.6 semi-synchronous replication
     
  Add Date : 2018-11-21      
         
         
         
  Configure common clone

Two servers, one main one

Master:

10.10.1.30

Slave:

10.10.1.200

Modify each machine my.cnf document, respectively modify server_id

Master server_id = 1, slave of server_id = 2

Restart both servers by:

show variables like 'server_id';

You can view the two servers server_id not the same.

Log Master, enter:

. Grant replication slave on * * to 'repl'@'10.10.1.200' identified by 'password';
flush privileges;
show master status;

File and Postion master record field, and one will stand.

Log Slave, enter:

mysql> change master to
    -> Master_host = '10 .10.1.30 ',
    -> Master_port = 3306,
    -> Master_user = 'repl',
    -> Master_password = 'password',
    -> Master_log_file = 'bin-file.000035', // just the Master File field
    -> Master_log_pos = 407; // Master just that Postion field

mysql> start slave;
Query OK, 0 rows affected (0.03 sec)

Enter: show slave status \ G
If there is no error message, then clone the configuration.

Now configure the semi-synchronous replication:

Check for semi-synchronous replication plug-in, version 5.6 ships were built.

To: / usr / lib64 / mysql / plugin here to see if there are:

[Root @ localhost plugin] # ll -h semisync_ *
-rwxr-xr-x. 1 root root 40K Sep 15 00:16 semisync_master.so
-rwxr-xr-x. 1 root root 14K Sep 15 00:16 semisync_slave.so

Then log Master, enter:

install plugin rpl_semi_sync_master soname 'semisync_master.so';


Then log Slave input:

install plugin rpl_semi_sync_slave soname 'semisync_slave.so';

These two documents. And then were on the Master's my.cnf file add:

rpl_semi_sync_master_enabled = 1
rpl_semi_sync_master_timeout = 3000
rpl_semi_sync_master_trace_level = 32
rpl_semi_sync_master_wait_no_slave = on

binlog_format = ROW
binlog_row_image = minimal

Slave in the my.cnf file add:

rpl_semi_sync_slave_enabled = 1
slave-parallel_workers = 4

binlog_format = ROW
binlog_row_image = minimal

Finally slave-parallel_worker slave parameters can increase worker threads and improve performance. The binlog_format Use row format will be more secure, the image is set to minimal, the binlog only records affected rows.
Restart both servers are available.

You can then enter the master or slave:

show global variables like 'rpl_semi%';
     
         
         
         
  More:      
 
- CentOS 6.5 installation VNCServer implement graphical access (Server)
- Using 30 seconds to write a detailed analysis of garbage removal system (Linux)
- Java development environment to build under Ubuntu (Linux)
- Detailed reference Oracle 11g Partition (Database)
- Ubuntu Live CD by updating Grub resume boot the Boot Menu (Linux)
- Quickly locate the mistakes by gdb location (Programming)
- Linux firewall anti-hacker disguise malicious attacks (Linux)
- Firewall - Internet Militarization (Linux)
- Linux System Getting Started Learning: Linux how to install 7zip (Linux)
- To access an Oracle database using Instant Client (Database)
- MySQL multi-instance configuration (Database)
- Write perfect printf (Programming)
- Linux common network tools: ping host sweep (Linux)
- Eclipse 3.7.2 can not start solving under Ubuntu 14.04 (Linux)
- Linux system on a virtual machine to access the Internet (Linux)
- Specifies the open ports of the SUSE firewall settings (Linux)
- How to create a secure and easy to remember password (Linux)
- Linux SVN account password to save your settings (Linux)
- Linux Proc File System Experiment (Linux)
- LVS + Keepalived the DR mode (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.