Use of monitoring tools in percona-toolkit series
1. pt-deadlock-logger
Function introduction:
Extract and record mysql deadlock Information
Usage:
Pt-deadlock-logger [OPTION...] SOURCE_DSN
Collect and save the latest deadlock information on mysql. You can directly print the deadlock information and store the deadlock information to the database, the deadlock information includes the server where the deadlock occurred, the time when the deadlock occur
Percona-toolkit tutorial tools
1. pt-archiver
Function introduction:
Archive the records of tables in the mysql database to another table or file
Usage:
Pt-archiver [OPTION...] -- source DSN -- where WHERE
This tool only archives old data and does not significantly affect OLTP query of online data. You can insert the data into other tables on another server or write it into a file, it is convenient to use the load data infile command to import data. Y
PremiseIt should be determined that a single table space is used, otherwise single table backup and recovery is not supported. In the configuration file inside the mysqld section Plusinnodb_file_per_table = 1Environment Description:Main Library: 192.168.0.1From library 1:192.168.0.2From library 2:192.168.0.3Backup utility: Percona xtrabackup version 2.4.8 based on MySQL server 5.7.13 Linux (x86_64) (revision id:97330f7)To create a Chenfeng library on
MySQL Server Version:Server version: 5.7.10-log MySQL Community Server (GPL)Percona xtrabackup Version:Innobackupex version 2.4.2 Linux (x86_64) (revision id:8e86a84)Description[Master]: Represents a statement executed on the master library [slave]: Represents a statement executed on the slave library--Perform a master library full-ready[Master]innobackupex--parallel=4/data/backup/full--no-timestamp--Attach the log to the backup [Master]innobackupex--
Database operation functions in the CI framework $ this-> db-> where () usage summary, this-db-
This example summarizes the usage of database operation functions $ this-> db-> where () in the CI framework. We will share this with you for your reference. The details are as follows:
CI framework database operation function this->
Percona-toolkit-System Tools
1. pt-diskstats
Function introduction:
Is an interactive monitoring tool for GUN/LINUX.
Usage:
Pt-diskstats [OPTION...] [FILES]
Print disk io statistics for GUN/LINUX, which is a bit like iostat, but this tool is interactive and more detailed than iostat. Data collected from remote machines can be analyzed.
Example:
Example 1: view the status of all disks on the local machine:
Pt-diskstats
Example 2: only view the status o
Tags: record delete table Inno style rest Time Date Description poiuse third-party tools to back up MySQL-----perconaFirst, pre-preparation work:1, install the dependency package: Yum-y Install PERL-DIGEST-MD5 Perl-dbd-mysqlRPM-IVH libev-4.15-1.el6.rf.x86_64.rpm2. Installation Main package: percona-xtrabackup-24-2.4.7-1.el7.x86_64.rpm3. Contains two components:/usr/bin/xtrabackup: Supports InnoDB and XTRADB (incremental backup)/usr/bin/innobackupex: S
Tags: style blog http color io ar for SP divhttps://tools.percona.com/Follow the prompts on the site to set up a total of 7 steps.# Generated by Percona Configuration Wizard (http://tools.percona.com/) version rel5-20120208# Configuration Name server-dev-binary-1009Generated for#**********@163. com at the-Ten- the Geneva: +:Ten[mysql]# CLIENT #port=3306Socket=/usr/local/mysql/data/mysql.sock[mysqld]# General #user=Mysqldefault-storage-engine =Innodbso
Tags: Pat ring partial TMP Import Table Percona Backup call PrepareXtrabackup can also implement partial backups, that is, to back up only one or some of the specified databases or some or some of the tables in a database. However, to use this feature, you must enable the innodb_file_per_table option, which is to save each table as a separate file. It also does not support the--stream option, which means that data is not supported to be piped to other
Tags: png recover title cut ROS Development ext Cat TarThis article describes a simple SQL script that implements the ability to shrink all non-system db file sizes across Microsoft SQL Server instances. As a program that deals with SQL every day, apes often encounter db files that are too large to fill the space: For the development tester, if the DB data is n
1. tpcc test results
Click to view the chart
2. Test Environment
3. Key configuration options of InnoDB
Note:1. ring replication: it refers to the creation of ring replication on three nodes, each of which is master/slave. During the test, we also tried to simulate master downtime, and slave switched the master randomly to verify the data reliability in GTID mode. In the test mode, the data reliability was indeed guaranteed.2. bp8_facts: Set innodb_buffer_pool_instances = 8 and metadata_locks_
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
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
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.