Installing the MySQL optimizer in the CentOS environment: pt-query-digest

Source: Internet
Author: User
Tags install perl percona

In advance, I use a virtual machine to do CentOS6.7, the host is WINDOWS10, mainly with CentOS to install software and operation.


As operations staff master MySQL "Delete and change" is a must, and then learn a little optimization is good, MySQL comes with a "slow check file" thing, but that thing is very basic, although very good operation but the ability is very limited, so pt-query-digest tools came into being, This software is only available in Linux, so users of Windows can close this page.

You can see https://www.percona.com/doc/percona-toolkit/2.2/pt-query-digest.html#downloading first, this is the official installation description.

Pt-query-digest This software is dependent, if you come up on the "[[email protected] ~]# RPM-IVH percona-toolkit-2.2.14-1.noarch.rpm" Then it will say:

warning:percona-toolkit-2.2.14-1.noarch.rpm:Header V4 dsa/sha1 Signature, key ID cd2efd2a:NOKEYerror:Failed Dependencies:perl (DBI) >=1.13is needed by percona-toolkit-2.2.14-1.Noarch Perl (dbd::mysql) >=1.0is needed by percona-toolkit-2.2.14-1.Noarch Perl (time::hires) is needed by percona-toolkit-2.2.14-1.Noarch Perl (IO::SOCKET::SSL) is needed by percona-toolkit-2.2.14-1.Noarch Perl (Term::readkey) is needed by percona-toolkit-2.2.14-1.Noarch

That is, it requires 5 dependent packages, Dbi,mysql,hires,socket::ssl,readkey, which can then be used

yum-y Install Perl perl-io-socket-ssl perl-dbd-mysql perl-time-hires to install the top four in a breath, because I have already installed MySQL 5.1 beforehand so these problems are very good whole.

            But to readkey here, use wget http://pkgs.repoforge.org/perl-TermReadKey/ PERL-TERMREADKEY-2.30-1.EL5.RF.X86_64.RPM, it will prompt 404  not Found, I do not know what the reason, so I am on this machine to open this website to get RPM package, my VM also installed the VM Tools or use the SVN server I installed a few days ago to upload my RPM package to my virtual machine CentOS, cut this RPM package into the appropriate directory, CD to that directory, use RPM-IVH-/perl-termreadkey-2.30-1.el5.rf.x86_64.rpm (Install RPM is to enter the full name of the package!) ), after installing Termreadkey, you can go back to completely install Percona-toolkit, the effect

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/79/9B/wKiom1aWAoHj2IpMAAERCq7ubOo745.png "title=" Screenshot.png "alt=" Wkiom1awaohj2ipmaaercq7uboo745.png "/> Progress bar went to 100%, then obtained" percona-toolkit.rpm ", this time Rpm-iv H percona-toolkit.rpm, you will see the installation progress. After installation, you can use the Pt-query-digest--help to check if the Help file is displayed, then it proves to be installed . Note that the help front has two--, if not hit-then will be networked or internal search for God horse, anyway content appears very slow, can CTRL + C to abort.


At this point, the installation to complete, as to how to use, let me research and research ...

Resources:

Http://blog.chinaunix.net/uid-20639775-id-3206802.html

Https://www.percona.com/doc/percona-toolkit/2.2/pt-query-digest.html#downloading

http://blog.csdn.net/johnstrive/article/details/46437547

This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1734656

Installing the MySQL optimizer in the CentOS environment: pt-query-digest

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.