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 deletedTw
Percona utility-Introduction to pt-kill, perconapt-kill
Pt-kill is an excellent tool for kill MySQL connection and is part of percona toolkit, when the maximum number of connections is exceeded due to a large number of idle connections and a problematic SQL statement causes a high mysql load, you must kill some connect
Since the mysql5.6 Community Edition does not have an Enterprise Edition-specific audit audit plugin, the recent need to increase the audit function of the production MySQL database, in consideration of Percona, MARIDB and macfee3 versions of audit, finally chose the more familiar Percona version.Note here, it is best to adopt the same child version of the PXC au
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 inf
http://blog.itpub.net/28916011/viewspace-1971933/Percona Several graphical explanations for monitoring MySQLRecently, I examined the meaning of several diagrams of Percona monitoring MySQL.COM_XXX indicates the number of times each XXX statement executes as follows:Com_select the number of times a select operation is performed, only one query is cumulative plus 1Com_update number of update operations perfor
Use the official binary installation directly.Https://www.percona.com/doc/percona-xtradb-cluster/5.6/installation.html#installationInnobackupex:This is actually a Perl script package for the following three tools, which can be backed up MyISAM, InnoDB, xtradb tables.Xtrabackup:A binary file compiled from C that can only back up InnoDB and xtradb data.Xbcrypt:The data used to encrypt or decrypt the backup.Xbstream:A compressed file used to decompress o
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 t
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
Pt-kill is a good kill MySQL connection tool, is a part of Percona Toolkit, in the due to more idle connections cause more than the maximum number of connections, a problem of SQL causes MySQL load is high, you need to kill some connections, This tool is mainly used for this purpose.
Obtain a connection that satisfies the condition from show processlist or read
Configure the Percona Yum repository under centos5.6 and install the Xtrabackup toolFirst, install the dependencies:Yum Install PERL-DBIYum Install Perl-dbd-mysqlYum Install Perl-time-hiresYum Install Perl-io-socket-sslSecond, configure the Yum source,Method 1, automatically install Percona's Yum warehouse (the following are x86_64 and i386 platforms respectively)#rpm-IVH http://www.percona.com/downloads/percona
RPM Way to install MySQL 5.6
mysql-server-5.6.27-1.el6.x86_64.rpmmysql-client-5.6.27-1.el6.x86_64.rpmMYSQL-SHARED-COMPAT-5.6.27-1.EL6.X86_64.RPM (Perl-dbd-mysql require)2.my.cnf[Email protected] lib]# VI/ETC/MY.CNF# for advice The change settings# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html[Mysqld]DataDir =/var/lib/mysqlLog_bin
save the results.
2. pt-pmp
Function introduction:
Execute the aggregated GDB stack trace for the query program. The advanced stack trace is used to summarize the tracing information.
Usage:
Pt-pmp [OPTIONS] [FILES]
Example:
Pt-pmp-p 21933
Pt-pmp-B/usr/local/mysql/bin/mysqld_safe
3. pt-visual-explain
Function introduction:
The explain execution plan is formatted and output in tree mode for easy reading.
Usage:
Pt-visual-explain [OPTION...] [FILE...]
-visual-explain-c MYSQL-E "explain select * from Mysql.user" | Pt-visual-explainFor example:# mysql-uroot-proot-e ' Explain select * from B2b.ecs_goods ' > A.sql # pt-visual-explain/root/a.sqlOr one-step process through the pipeline:# mysql-uroot-proot-e ' Explain select * from B2b.ecs_goods ' |pt-visual-explainPt-config-diffDescriptionCompare the differences bet
My source[Email protected]:/tmp/percona-xtrabackup_debian8# cat/etc/apt/sources.listdeb Http://mirrors.ustc.edu.cn/debian Jessie Main contrib non-freedeb-src Http://mirrors.ustc.edu.cn/debian Jessie Main contrib non-freedeb/HTTP/Mirrors.ustc.edu.cn/debian jessie-proposed-updates main contrib non-freedeb-src Http://mirrors.ustc.edu.cn/debianJessie-proposed-updates Main contrib non-freedeb Http://mirrors.ustc.edu.cn/debian jessie-updates main contrib NO
server IP user name password, you can analyze the entire master-slave architecture of each server information, including but not limited to MySQL version, IP address, server Id,mysql service startup time, role (main/from), Slave Status (lag behind the master server for how many seconds, there is no error, Slave is not running). Pt-Slave-Find--host=localhost--user=rhce6--password=rhce6MySQL Deadlock monitor
--ssl-cert PATH X509 cert in PEM format--ssl-key PATH X509 key in PEM format--ssl-cipher TEXT SSL cipher to use--ssl-verify-server-cert Verify server ' s "Common Name" in its certagainst hostname used when connecting. Thisoption is disabled by default-V,--version version of MYCLI.-D,--database TEXT database to use.-R,--prompt TEXT prompt format (Default: "\ t \[email protected]\h:\d>")-L,--logfile FILENAME Log every query and its results to a file.--defaults-group-suffix TEXT Read Config group w
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
.Editing a configuration file# MKDIR/ETC/MASTERHA# mkdir-p/masterha/app1# CP samples/conf/*/etc/masterha/# CAT/ETC/MASTERHA/APP1.CNF[Server default]Manager_workdir=/masterha/app1Manager_log=/masterha/app1/manager.logUser=mhapassword=123456Ssh_user=rootRepl_user=replrepl_password=654321Ping_interval=1[Server1]hostname=172.16.52.130Candidate_master=1 # Set the elevation level, if each is 1, the failover main library is promoted in the configuration orderMaster_binlog_dir= "/usr/local/
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.