Getting error "Plugin caching_sha2_password could not be loaded" on PT-QUERY-DIGEST

Hello dear Percona team,

after modifying our users from “mysql_native_password“ to “caching_sha2_password“ authentication plugin, a script that calls “pt-query-digest“ started to fail with this error:

DBI connect(';host=localhost;mysql_read_default_group=client','pmm_user',...) failed: Plugin caching_sha2_password could not be loaded: /usr/lib64/mariadb/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory at /usr/bin/pt-query-digest line 1001.

The user “pmm_user“ is set up with “caching_sha2_password“ auth plugin and is able to connect to the database normally:

mysql> select user, host, plugin from mysql.user where user = 'pmm_user';
+------------------+-----------+-----------------------+
| user             | host      | plugin                |
+------------------+-----------+-----------------------+
| pmm_user         | localhost | caching_sha2_password |
+------------------+-----------+-----------------------+

Connecting:

mysql -u pmm_user -h localhost -p
Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 49311
Server version: 8.0.26-16 Percona Server (GPL), Release 16, Revision 3d64165

Copyright (c) 2009-2021 Percona LLC and/or its affiliates
Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

The script was working properly prior to the authentication plugin change. After this, it keeps giving the error stated at the beginning of this correspondence.

Any ideas on why we are getting this issue?

Thanks.

Hello @FabricioPedrosoJorge

Do you have updated Perl DBD/DBI::mysql package?

Once you update the package it should be able to authenticate using caching_sha2_password plugin

Hello Yunus, thanks for the assistance.

Currently we have this version:

sudo rpm -qa | grep -i perl-DBD-MySQL

   perl-DBD-MySQL-4.046-2.fc28.x86_64

The package to be updated is this one: DBD::mysql - MySQL driver for the Perl5 Database Interface (DBI) - metacpan.org ?

https://downloads.percona.com/downloads/percona-distribution-mysql-ps/percona-distribution-mysql-ps-8.0.43/binary/redhat/8/x86_64/perl-DBD-MySQL-4.050-5.el8.x86_64.rpm

You can try downloading this version from our website and check if that helps.