DEBIAN8 installation Percona-toolkit detection of MySQL index and slow query analysis

Source: Internet
Author: User
Tags unpack install perl mysql index percona

today's plan to install the experience: Percona-toolkit_3.0.4-1.jessie_amd64.deb to detect MySQL indexes and slow query analysis
but encountered the lack of: libmysqlclient18 and Libdbd-mysql-perl problems
Solution:
Https://packages.debian.org/jessie/amd64/libdbd-mysql-perl/download
Https://packages.debian.org/jessie/amd64/libmysqlclient18/download
Download good: Install via dpkg-i
A: Install Percona-toolkit_3.0.4-1.jessie_amd64.deb
: https://www.percona.com/doc/percona-repo-config/apt-repo.html
Installation: Apt-get InstallPercona-toolkit

document reference: Https://www.percona.com/doc/percona-toolkit/LATEST/index.html
1: The problem encountered:
[email protected]:~#!pt
pt-duplicate-key-checker--port=3306--password=ops12300.--host=localhost--user=ops
cannot connect to MySQL because the Perl dbd::mysql module was not installed or not found.  Run ' Perl-mdbd::mysql ' to see the directories, Perl searches for Dbd::mysql. If Dbd::mysql is not installed, try:
debian/ubuntu apt-get Install Libdbd-mysql-perl
rhel/centos Yum Install perl-dbd-mysql
OpenSolaris pgk Install Pkg:/sunwapu13dbd-mysql

2: Download the Libdb-mysql-perl package:  Https://packages.debian.org/jessie/amd64/libdbd-mysql-perl/download

   [email protected]:~# dpkg-i libdbd-mysql-perl_4.028-2+deb8u2_amd64.deb
Selecting Libdbd-mysql-perl package is not selected.
(Reading Database ... The system currently has a total of 68,528 files and directories installed. )
Preparing to unpack Libdbd-mysql-perl_4.028-2+deb8u2_amd64.deb ...
Unpacking Libdbd-mysql-perl (4.028-2+DEB8U2) ...
Dpkg: Dependency issues make the Libdbd-mysql-perl configuration work impossible to continue:
Libdbd-mysql-perl relies on libmysqlclient18 (>= 5.5.24+dfsg-1);
Package libmysqlclient18 is not installed.
DPKG: Error processing package Libdbd-mysql-perl (--install):
Dependency issues-Still not configured
Processing triggers for man-db (2.7.0.2-5) ...
An error occurred while processing:
Libdbd-mysql-perl

3: DownloadLIBMYSQLCLIENT18 Package: Https://packages.debian.org/jessie/amd64/libmysqlclient18/download
4: Installation
[email protected]:~# dpkg-i libmysqlclient18_5.5.57-0+deb8u1_amd64.deb
(Reading Database ... The system currently has a total of 68,575 files and directories installed. )
Preparing to unpack Libmysqlclient18_5.5.57-0+deb8u1_amd64.deb ...
Unpacking Libmysqlclient18:amd64 (5.5.57-0+DEB8U1) to (5.5.57-0+DEB8U1) ...
Setting Libmysqlclient18:amd64 (5.5.57-0+DEB8U1) ...
Processing triggers for Libc-bin (2.19-18+DEB8U10) ...
[email protected]:~# dpkg-i libdbd-mysql-perl_4.028-2+deb8u2_amd64.deb
(Reading Database ... The system currently has a total of 68,575 files and directories installed. )
Preparing to unpack Libdbd-mysql-perl_4.028-2+deb8u2_amd64.deb ...
Unpacking Libdbd-mysql-perl (4.028-2+DEB8U2) to (4.028-2+DEB8U2) ...
Setting Libdbd-mysql-perl (4.028-2+DEB8U2) ...
Processing triggers for man-db (2.7.0.2-5) ...

5: Test Use
[Email protected]:~# pt-duplicate-key-checker--port=3306--password=ops12300. --host=localhost--user=ops--socket=/tmp/mysql.sock
# A Software update is available:
# ########################################################################
# forge.erp_agent_community
# ########################################################################


# Agent_community_agent_id_index is a left-prefix of PRIMARY
# Key Definitions:
# KEY ' Agent_community_agent_id_index ' (' agent_id '),
# PRIMARY KEY (' agent_id ', ' community_id '),
# Column Types:
# ' agent_id ' int (ten) unsigned NOT NULL
# ' community_id ' int (ten) unsigned NOT NULL
# To remove this duplicate index, execute:
ALTER TABLE ' forge '. ' erp_agent_community ' DROP INDEX ' agent_community_agent_id_index ';


# ########################################################################
# Forge.erp_agent_ridgepole
# ########################################################################


# Agent_ridgepole_agent_id_index is a left-prefix of PRIMARY
# Key Definitions:
# KEY ' Agent_ridgepole_agent_id_index ' (' agent_id '),
# PRIMARY KEY (' agent_id ', ' ridgepole_id '),
# Column Types:
# ' agent_id ' int (ten) unsigned NOT NULL
# ' ridgepole_id ' int (ten) unsigned NOT NULL
# To remove this duplicate index, execute:
ALTER TABLE ' forge '. ' Erp_agent_ridgepole ' DROP INDEX ' agent_ridgepole_agent_id_index ';


# ########################################################################
# Forge.erp_city_head_office
# ########################################################################


# City_head_office_city_id_index is a left-prefix of PRIMARY
# Key Definitions:
# KEY ' City_head_office_city_id_index ' (' city_id '),
# PRIMARY KEY (' city_id ', ' head_office_id '),
# Column Types:
# ' city_id ' int (ten) unsigned NOT NULL
# ' head_office_id ' int (ten) unsigned NOT NULL
# To remove this duplicate index, execute:
ALTER TABLE ' forge '. ' Erp_city_head_office ' DROP INDEX ' city_head_office_city_id_index ';


# ########################################################################
# forge.erp_comments
# ########################################################################


# Comments_trace_id_index is a left-prefix of Acceptor_type
# Key Definitions:
# KEY ' Comments_trace_id_index ' (' trace_id '),
# KEY ' Acceptor_type ' (' trace_id ', ' Acceptor_type ') USING BTREE
# Column Types:
# ' trace_id ' int (one) NOT NULL
# ' acceptor_type ' varchar (255) COLLATE utf8_unicode_ci NOT NULL
# To remove this duplicate index, execute:
ALTER TABLE ' forge '. ' erp_comments ' DROP INDEX ' comments_trace_id_index ';


# ########################################################################
# forge.erp_community_education
# ########################################################################


# Community_education_community_id_index is a left-prefix of PRIMARY
# Key Definitions:
# KEY ' Community_education_community_id_index ' (' community_id '),
# PRIMARY KEY (' community_id ', ' education_id '),
# Column Types:
# ' community_id ' int (ten) unsigned NOT NULL
# ' education_id ' int (ten) unsigned NOT NULL
# To remove this duplicate index, execute:
ALTER TABLE ' forge '. ' erp_community_education ' DROP INDEX ' community_education_community_id_index ';


DEBIAN8 installation Percona-toolkit detection of MySQL index and slow query analysis

Related Article

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.