Percona MySQL5.6 semi-synchronous Replication
Configure normal clone first
Two servers, one master and one slave
Master Server:
10.10.1.30
Slave:
10.10.1.200
Modify the my. cnf file of each machine and the server_id
Master server server_id = 1, slave server_id = 2
Restart the two servers and run the following command:
Show variables like 'server _ id ';
The server_id of the two servers is different.
Log on to the Master and enter:
Grant replication sl
protected] ' 172.16.52.% ' identified by ' 123456 ';Flush privileges;in order to ensure subsequent rapid switching, the same user Authorization for replication on DB:GRANT REPLICATION SLAVE on * * to ' repl ' @ ' 172.16.52.% ' identified by ' 654321 ';Flush privileges;(v) TestingSshConnectionMasterha_check_ssh--conf=/etc/masterha/app1.cnf(vi) test master-Slave synchronizationMasterha_check_repl--conf=/etc/masterha/app1.cnf(vii) Start/Stop management node processStart the Management node process
Percona-toolkit usage tutorial-configuration tools 1. pt-config-diff
L function introduction:
Compare mysql configuration files and server parameters
L usage:
Pt-config-diff [OPTION...] CONFIG [CONFIG...]
CONFIG can be a file or a data source name. at least two configuration file sources must be specified, just like the diff command under unix. if the configuration is exactly the same, nothing will be output.
L example:
Example 1: view the difference
One: Uninstall the old versionUse the following command to check if MySQL Server is installedRpm-qa | grep MySQLSome words are unloaded by the following commandRPM-E MySQL//normal delete mode rpm-e--nodeps MySQL//brute force Delete mode, if you use the above command to delete, prompted to have other dependent files, then use this command can be strongly deletedTwo: Install MySQL install the package required for compiling codeYum-y install make gcc-c++ cmake bison-devel ncurses-develDownload
"Mysql_password= ""
Mysql_cmdline= "/usr/local/mysql/bin/mysql
B. Run/usr/local/mysql/bin/clustercheck 200 indicates Clustercheck validation succeeded
2.XINETD Configuration
A.yum install-y xinetd.x86_64
b.cp/usr/local/mysql/xinetd.d/mysqlchk/etc/xinetd.d/
D.vim/etc/xinetd.d/mysqlchk changes the server to/usr/local/mysql/bin/clustercheck (server=/usr/local/mysql/bin/ Clustercheck)
E. Change of authority chmod +x Mysqlchk
F.vim/etc/services the last New line Mysqlchk 9200/tcp # Mysqlchk
G.service
Percona mysql5.7 centos/red hat-rpm package does not display a password during installation. It is in the error log. The automatically generated my.cnf contains this line of Log-error=/var/log/mysqld.log.So, here's our password:[Email protected] lyh]# cat/var/log/mysqld.log | grep "Temporary password"2017-06-26t04:28:05.537965z 1 [Note] A temporary password is generated for [email protected]:Ca!wb/i+l7elAttention! Special symbols need to be escaped th
1. Download source
percona-xtradb-cluster-5.7.19-29.22.tar.gz-https://www.percona.com/downloads/percona-xtradb-cluster-latest/
Openssl-1.2.j.tar.gz
2. Compile OpenSSL
#CFLAGS =-fpic/config--prefix=/opt/openssl-1.0.2j/.
#make make Install
3. Compile PXC
#mkdir output
#./build-ps/build-binary.sh Output--with-ssl/opt/openssl-1.0.2j/
If everything goes well, you can find the compression package for the final
MySQL (Percona Server) 5.6.15 Main Library: 192.168.2.21 from library: 192.168.2.22For example, we synchronize the database as: Test. If you need to synchronize multiple databases, there is a description below.MySQL Master-slave replication principle1. master将改变记录到二进制日志(binary log)中(这些记录叫做二进制日志事件,binary log events,可以通过show binlog events进行查看);2. slave将master的binary log events拷贝到它的中继日志(relay log);3. slave重做中继日志中的事件,将改变反映它自己的数据。Main Library (192.16
Download and user Empowerment Reference previous article Percona-toolkit pt-table-checksums detection of MySQL master-slave data consistencyUse Pt-table-checksums to detect data consistency, and then use Pt-table-sync for master-slave consistency repair, noting that the repaired table must have a primary key or a unique indexUnder Main vault bash execution:./pt-table-checksum--nocheck-replication-filters--replicate=test.checksums--host=10.50.12.33--po
1.
Back up database
Concept: it refers to backing up all data files and control files of the database, and also backing up parameter files and password files.
Note: When backing up a database, do not back up redo logs.
1.1
Consistent backup
Concept: Database Consistency backup refers to the method for backing up all data files and control files after the database is disabled. When the SHUTDOWN command is u
XtrabackupXtrabackup is a free database hot backup software Percona open source, which can back up non-blocking database of InnoDB database and XTRADB storage engine (also need to add a table lock for MyISAM backup);The mysqldump backup method is a logical backup, the bigges
save disk resources and network bandwidth.
(4) Data availability can be verified by automatic backup.
A. Install rabackup
[root@cai tools]# tar zxf percona-xtrabackup-2.4.2-Linux-x86_64.tar.gz [root@cai tools]# mv percona-xtrabackup-2.4.2-Linux-x86_64 /application/percona-xtrabackup2.4.2[root@cai tools]# ln -s /applic
---------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------Total 2.5 MB/s| One MB 00:04 warning:rpmts_HdrFromFdno:Header V4 dsa/sha1 Signature, key ID cd2efd2a:nokeyretrieving key from fi Le:///etc/pki/rpm-gpg/rpm-gpg-ke
Xtrabackup is an open-source software developed by percona. It is an open-source alternative to innodb Hot Backup Tool ibbackup (charged commercial software. Xtrabackup consists of xtrabackup and innobackupex. xtrabackup is used to back up tables of innodb and xtraDB engines, while innobackupex is used to back up myisam and in
Xtrabackup is an open-source software developed by
[MySQL] innobackupex online backup and recovery (full and incremental) Xtrabackup is an open-source software developed by percona. It is the innodb Hot Backup Tool ibbackup (paid commercial software) is an open-source alternative. Xtrabackup consists of xtrabackup and innobackupex. The xtrabackup tool is used to back up innodb and xtra
[MySQL] innobackupex online
Why do I need a delayed backup?Percona-xtrabackup is an excellent tool for incremental backups. The delayed backups we talked about today are also using their products.AB replication was previously mentioned in the MySQL AB replication article. Let's first review the key points of MySQL replication. AB replication is also known as master-slave replication, the implementation of data synchronization. After t
Mysql Backup Tools Xtraback full-volume and incremental testingXtrabackup is an open source project for Percona, can be hot backed up InnoDB, XtraDB, and MyISAM (Will lock the table)Official website Http://www.percona.com/docs/wiki/percona-xtrabackup:startXtrabackup is an open source software developed by Percona , whi
1. Overview of Xtrabackup:
Percona Xtrabackup is an open-source and free mysql Database Hot Backup Software. It can back up InnoDB and XtraDB storage engine databases in a non-blocking manner (Table locks are also required for MyISAM backup ). XtraBackup supports all Percona servers, MySQL, MariaDB, and Drizzle.
XtraBa
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.