# Getting error "Plugin caching\_sha2\_password could not be loaded" on PT-QUERY-DIGEST

**URL:** <https://forums.percona.com/t/getting-error-plugin-caching-sha2-password-could-not-be-loaded-on-pt-query-digest/39308>\
**Category:** Percona Toolkit\
**Created:** [September 9, 2025, 8:16am UTC](https://forums.percona.com/t/getting-error-plugin-caching-sha2-password-could-not-be-loaded-on-pt-query-digest/39308 "2025-09-09T08:16:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FabricioPedrosoJorge](https://avatars.discourse-cdn.com/v4/letter/f/bbe5ce/32.png) [@FabricioPedrosoJorge](https://forums.percona.com/u/FabricioPedrosoJorge)\
**Post date:** [September 9, 2025, 8:16am UTC](https://forums.percona.com/t/getting-error-plugin-caching-sha2-password-could-not-be-loaded-on-pt-query-digest/39308/1 "2025-09-09T08:16:15Z")

</div>

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:

```auto
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:

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

```

Connecting:

```auto
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.

---

<div class="post-metadata">

**Author:** ![Yunus](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus/32/6430_2.png) [@Yunus](https://forums.percona.com/u/Yunus)\
**Post date:** [September 10, 2025, 6:08am UTC](https://forums.percona.com/t/getting-error-plugin-caching-sha2-password-could-not-be-loaded-on-pt-query-digest/39308/2 "2025-09-10T06:08:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![FabricioPedrosoJorge](https://avatars.discourse-cdn.com/v4/letter/f/bbe5ce/32.png) [@FabricioPedrosoJorge](https://forums.percona.com/u/FabricioPedrosoJorge)\
**Post date:** [September 11, 2025, 10:29am UTC](https://forums.percona.com/t/getting-error-plugin-caching-sha2-password-could-not-be-loaded-on-pt-query-digest/39308/3 "2025-09-11T10:29:38Z")

</div>

Hello Yunus, thanks for the assistance.

Currently we have this version:

```auto
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://metacpan.org/pod/DBD::mysql) ?

---

<div class="post-metadata">

**Author:** ![Yunus](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus/32/6430_2.png) [@Yunus](https://forums.percona.com/u/Yunus)\
**Post date:** [September 11, 2025, 11:05am UTC](https://forums.percona.com/t/getting-error-plugin-caching-sha2-password-could-not-be-loaded-on-pt-query-digest/39308/4 "2025-09-11T11:05:43Z")

</div>

[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](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.
