Hello,
Installed percona-server 8.4.7 and percona-toolkit on Debian 13 using Percona apt repository.
percona-server-server package version is 8.4.7-7-1.trixie
percona-toolkit package (containing pt-show-grants) version is 3.7.1-2.trixie
The error is:
$ pt-show-grants
install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed in require at (eval 8) line 3.
package libdbd-mysql-perl version 5.013-1.trixie is also well installed from Percona apt repository.
Do you have any ideas how to fix this?
Thanks!
Did you use the percona-release tool to install?
If you attempted to install the packages manually, you may not have the latest version of DBD:mysql as the version from OS packages is typically out of date. Try using our repo manager.
I did not use percona-release tool to install.
Do you a way to check that I am running the latest version of DBD:mysql?
DBD:mysql is packaged through libdbd-mysql-perl. Installed version of libdbd-mysql-perl from Percona apt repository is 5.013-1.trixie.
Thanks!
Hi @thomariobros ,
So, “pt-show-grants 3.7.1 broken” this is not true. It is about the perl module version
Can you try sharing the following:
dpkg -l | grep perl
perl -v
perl -MDBD::mysql -e 'print $DBD::mysql::VERSION, "\n";'
perl -MDBD::mysql -e 'print "$INC{\"DBD/mysql.pm\"}\n";'
easy way out is what Matthew said… Install using repo which will take care of dependencies.
Thanks,
K
Hello,
Thanks for helping me.
Here are requested commands outputs:
$ dpkg -l | grep perl
ii libalgorithm-c3-perl 0.11-2 all Perl module for merging hierarchies using the C3 algorithm
ii libb-hooks-endofscope-perl 0.28-2 all module for executing code after a scope finished compilation
ii libb-hooks-op-check-perl:amd64 0.22-3+b2 amd64 Perl wrapper for OP check callbacks
ii libclass-accessor-perl 0.51-2 all Perl module that automatically generates accessors
ii libclass-c3-perl 0.35-2 all pragma for using the C3 method resolution order
ii libclass-data-inheritable-perl 0.10-1 all Perl module to create accessors to class data
ii libclass-inspector-perl 1.36-3 all Perl module that provides information about classes
ii libclass-method-modifiers-perl 2.15-1 all Perl module providing method modifiers
ii libclass-singleton-perl 1.6-2 all implementation of a “Singleton” class
ii libclone-perl:amd64 0.47-1+b1 amd64 module for recursively copying Perl datatypes
ii libcommon-sense-perl:amd64 3.75-3+b5 amd64 module that implements some sane defaults for Perl programs
ii libconfig-tiny-perl 2.30-1 all Read/Write .ini style files with as little code as possible
ii libdata-optlist-perl 0.114-1 all module to parse and validate simple name/value option pairs
ii libdatetime-locale-perl 1:1.41-1 all Perl extension providing localization support for DateTime
ii libdatetime-perl 2:1.65-1+b2 amd64 module for manipulating dates, times and timestamps
ii libdatetime-timezone-perl 1:2.65-1+2025b all framework exposing the Olson time zone database to Perl
ii libdbd-mysql-perl 1:5.013-1.trixie amd64 Perl5 database interface to the MariaDB/MySQL database
ii libdbi-perl:amd64 1.647-1 amd64 Perl Database Interface (DBI)
ii libdevel-callchecker-perl:amd64 0.009-2 amd64 custom op checking attached to subroutines
ii libdevel-stacktrace-perl 2.0500-1 all Perl module containing stack trace and related objects
ii libdpkg-perl 1.22.21 all Dpkg perl modules
ii libdynaloader-functions-perl 0.004-2 all deconstructed dynamic C library loading
ii libemail-date-format-perl 1.008-1 all Module to generate RFC-2822-valid date strings
ii liberror-perl 0.17030-1 all Perl module for error/exception handling in an OO-ish way
ii libeval-closure-perl 0.14-3 all Perl module to safely and cleanly create closures via string eval
ii libexception-class-perl 1.45-1 all module that allows you to declare real exception classes in Perl
ii libfile-fnmatch-perl 0.02-3+b4 amd64 Perl module that provides simple filename and pathname matching
ii libfile-sharedir-perl 1.118-3 all module to locate non-code files during run-time
ii libfind-lib-perl 1.04-1.1 all Perl module to intelligently find libraries
ii libio-pty-perl 1:1.20-1+b3 amd64 Perl module for pseudo tty IO
ii libio-socket-ssl-perl 2.089-1 all Perl module implementing object oriented interface to SSL sockets
ii libio-socket-timeout-perl 0.32-3 all IO::Socket with read/write timeout
ii libipc-run-perl 20231003.0-2 all Perl module for running processes
ii libjson-perl 4.10000-1 all module for manipulating JSON-formatted data
ii liblocale-gettext-perl 1.07-7+b1 amd64 module using libc functions for internationalization in Perl
ii libmailtools-perl 2.22-1 all modules to manipulate email in perl programs
ii libmath-calc-units-perl 1.07-2.1 all Human-readable unit-aware calculator
ii libmime-lite-perl 3.033-2 all module for convenient MIME message creation
ii libmodule-implementation-perl 0.09-2 all module for loading one of several alternate implementations of a module
ii libmodule-runtime-perl 0.018-1 all Perl module for runtime module handling
ii libmonitoring-plugin-perl 0.40-1 all family of perl modules to streamline writing Monitoring plugins
ii libmro-compat-perl 0.15-2 all mro::* interface compatibility for Perls < 5.9.5
ii libnamespace-autoclean-perl 0.31-1 all module to remove imported symbols after compilation
ii libnamespace-clean-perl 0.27-2 all module for keeping imports and functions out of the current namespace
ii libnet-smtp-ssl-perl 1.04-2 all Perl module providing SSL support to Net::SMTP
ii libnet-ssleay-perl:amd64 1.94-3 amd64 Perl module for Secure Sockets Layer (SSL)
ii libnetaddr-ip-perl 4.079+dfsg-2+b5 amd64 IP address manipulation module
ii libpackage-stash-perl 0.40-1 all module providing routines for manipulating stashes
ii libparams-classify-perl:amd64 0.015-2+b4 amd64 Perl module for argument type classification
ii libparams-util-perl 1.102-3+b1 amd64 Perl extension for simple stand-alone param checking functions
ii libparams-validate-perl:amd64 1.31-2+b3 amd64 Perl module to validate parameters to Perl method/function calls
ii libparams-validationcompiler-perl 0.31-1 all module to build an optimized subroutine parameter validator
ii libperl5.40:amd64 5.40.1-6 amd64 shared Perl library
ii libperlio-via-timeout-perl 0.32-3 all PerlIO layer that adds read & write timeout to a handle
ii libredis-perl 2:2.000-1 all persistent key-value database with network interface (Perl client library)
ii librole-tiny-perl 2.002004-1 all Perl module for minimalist role composition
ii libspecio-perl 0.50-1 all Perl module providing type constraints and coercions
ii libsub-exporter-perl 0.990-1 all sophisticated exporter for custom-built routines
ii libsub-exporter-progressive-perl 0.001013-3 all module for using Sub::Exporter only if needed
ii libsub-identify-perl 0.14-3+b3 amd64 module to retrieve names of code references
ii libsub-install-perl 0.929-1 all module for installing subroutines into packages easily
ii libsub-name-perl:amd64 0.28-1 amd64 module for assigning a new name to referenced sub
ii libsub-quote-perl 2.006008-1 all helper modules for subroutines
ii libswitch-perl 2.17-3 all switch statement for Perl
ii libsys-utmp-perl 1.8-2+b4 amd64 perl module to query UTMP files
ii libterm-readkey-perl 2.38-2+b4 amd64 perl module for simple terminal control
ii libtext-charwidth-perl:amd64 0.04-11+b4 amd64 get display widths of characters on the terminal
ii libtext-iconv-perl:amd64 1.7-8+b4 amd64 module to convert between character sets in Perl
ii libtext-wrapi18n-perl 0.06-10 all internationalized substitute of Text::Wrap
ii libtimedate-perl 2.3300-2 all collection of modules to manipulate date/time information
ii libtry-tiny-perl 0.32-1 all module providing minimalistic try/catch
ii libvariable-magic-perl 0.64-1+b1 amd64 module to associate user-defined magic to variables from Perl
ii libxstring-perl:amd64 0.005-2+b4 amd64 module containing isolated string helpers from B
ii perl 5.40.1-6 amd64 Larry Wall’s Practical Extraction and Report Language
ii perl-base 5.40.1-6 amd64 minimal Perl system
ii perl-doc 5.40.1-6 all Perl documentation
ii perl-modules-5.40 5.40.1-6 all Core Perl modules
ii perl-openssl-defaults:amd64 7+b2 amd64 version compatibility baseline for Perl OpenSSL packages
$ perl -v
This is perl 5, version 40, subversion 1 (v5.40.1) built for x86_64-linux-gnu-thread-multi
(with 48 registered patches, see perl -V for more detail)
Copyright 1987-2025, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using “man perl” or “perldoc perl”. If you have access to the
Internet, point your browser at https://www.perl.org/, the Perl Home Page.
$ perl -MDBD::mysql -e 'print $DBD::mysql::VERSION, "\n";'
Can’t load ‘/usr/lib/x86_64-linux-gnu/perl5/5.40/auto/DBD/mysql/mysql.so’ for module DBD::mysql: /usr/lib/x86_64-linux-gnu/perl5/5.40/auto/DBD/mysql/mysql.so: undefined symbol: mysql_sqlstate at /usr/lib/x86_64-linux-gnu/perl-base/DynaLoader.pm line 201.
at -e line 0.
Compilation failed in require.
BEGIN failed–compilation aborted.
$ perl -MDBD::mysql -e 'print "$INC{\"DBD/mysql.pm\"}\n";'
Can’t load ‘/usr/lib/x86_64-linux-gnu/perl5/5.40/auto/DBD/mysql/mysql.so’ for module DBD::mysql: /usr/lib/x86_64-linux-gnu/perl5/5.40/auto/DBD/mysql/mysql.so: undefined symbol: mysql_sqlstate at /usr/lib/x86_64-linux-gnu/perl-base/DynaLoader.pm line 201.
at -e line 0.
Compilation failed in require.
BEGIN failed–compilation aborted.
I do not have the issue when installing the same version of percona-toolkit on Debian 12.
Thanks!
I see some errors there… how about you just try reinstalling dbd…
sudo apt remove libdbd-mysql-perl
sudo apt install libdbd-mysql-perl
Tried to reinstall libdbd-mysql-perl but unfortunately same errors:
$ perl -MDBD::mysql -e 'print $DBD::mysql::VERSION, “\n”;'
Can’t load ‘/usr/lib/x86_64-linux-gnu/perl5/5.40/auto/DBD/mysql/mysql.so’ for module DBD::mysql: /usr/lib/x86_64-linux-gnu/perl5/5.40/auto/DBD/mysql/mysql.so: undefined symbol: mysql_sqlstate at /usr/lib/x86_64-linux-gnu/perl-base/DynaLoader.pm line 201.
at -e line 0.
Compilation failed in require.
BEGIN failed–compilation aborted.
I do get what is missing for the perl module to work 
Using docker I found a way to reproduce it.
Here is the Dockerfile:
ARG DEBIAN_VERSION
FROM debian:$DEBIAN_VERSION-slim
RUN apt update
RUN apt install -y curl
RUN curl -O https://repo.percona.com/apt/percona-release_latest.generic_all.deb
RUN apt install -y gnupg2 lsb-release ./percona-release_latest.generic_all.deb
RUN apt update
ARG PERCONA_REPO
RUN percona-release enable $PERCONA_REPO release
RUN apt install -y percona-toolkit
RUN perl -MDBD::mysql -e 'print $DBD::mysql::VERSION, "\n";'
RUN perl -MDBD::mysql -e 'print "$INC{\"DBD/mysql.pm\"}\n";'
RUN pt-show-grants
docker build --build-arg DEBIAN_VERSION=13 --build-arg PERCONA_REPO=pt --tag percona-toolkit-test --progress=plain . => 
docker build --build-arg DEBIAN_VERSION=13 --build-arg PERCONA_REPO=pdps-84-lts --tag percona-toolkit-test --progress=plain . => 
output:
#14 [11/11] RUN pt-show-grants
#14 0.262 DBI connect(‘;;mysql_read_default_group=client’,‘’,…) failed: Can’t connect to local server through socket ‘/run/mysqld/mysqld.sock’ (2) at /usr/bin/pt-show-grants line 1367.
#14 ERROR: process “/bin/sh -c pt-show-grants” did not complete successfully: exit code: 2
[11/11] RUN pt-show-grants:
0.262 DBI connect(‘;;mysql_read_default_group=client’,‘’,…) failed: Can’t connect to local server through socket ‘/run/mysqld/mysqld.sock’ (2) at /usr/bin/pt-show-grants line 1367.
It means pt-show-grants can load the mysql perl module but cannot connect to MySQL (expected, because it is not running).
output:
#12 ERROR: process “/bin/sh -c perl -MDBD::mysql -e ‘print $DBD::mysql::VERSION, "\n";’” did not complete successfully: exit code: 2
[ 9/11] RUN perl -MDBD::mysql -e ‘print $DBD::mysql::VERSION, “\n”;’:
0.249 Can’t load ‘/usr/lib/x86_64-linux-gnu/perl5/5.40/auto/DBD/mysql/mysql.so’ for module DBD::mysql: /usr/lib/x86_64-linux-gnu/perl5/5.40/auto/DBD/mysql/mysql.so: undefined symbol: mysql_sqlstate at /usr/lib/x86_64-linux-gnu/perl-base/DynaLoader.pm line 201.
0.249 at -e line 0.
0.249 Compilation failed in require.
0.249 BEGIN failed–compilation aborted.
It means pt-show-grants cannot load the mysql perl module.
So my guess is that there is something strange with the repo pdps-84-lts on Debian 13.
I will try to switch to the pt apt repo to install percona-toolkit.
Reinstalling libdbd-mysql-perl to a previous version apt install libdbd-mysql-perl=4.053-1 fixed the issue but it means libdbd-mysql-perl is retrieved from debian instead of percona pdps-84-lts apt repo.
So I guess there is something strange with the package libdbd-mysql-perl version 5.013-1 from repo pdps-84-lts on Debian 13.
Same issue with Percona 8.0: downgrading to the distribution version 4.050-3+b1 solves that problem, at least temporarily.
Versions:
- OS: Debian “Bullseye”
- Percona Toolkit:
3.6.0-1.bullseye
- Percona Server:
8.0.44-35-1.bullseye
- Percona Client:
8.0.44-35-1.bullseye
- libperconaserverclient21:
8.0.44-35-1.bullseye
- libdbd-mysql-perl:
- good:
4.050-3+b1
- bad:
1:5.013-1.bullseye