techsneeze / dmarcts-report-parser

A Perl based tool to parse DMARC reports from an IMAP mailbox or from the filesystem, and insert the information into a database. ( Formerly known as imap-dmarcts )
http://www.techsneeze.com/how-parse-dmarc-reports-imap/
GNU General Public License v3.0
223 stars 62 forks source link

Plugin caching_sha2_password could not be loaded #99

Closed muety closed 3 years ago

muety commented 3 years ago

I got the following error when trying to run the parser.

DBI connect('database=dmarc;host=172.17.0.4;port=3306','dmarc',...) failed: Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory at ./dmarcts-report-parser.pl line 266.
dmarcts-report-parser.pl: Cannot connect to database

In the meanwhile, I figured out that the following SQL query helped work around the issue:

ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'sshhh';
Maeglin73 commented 3 years ago

If you're using the MariaDB client with a MySQL server, this is to be expected. The server uses caching_sha2_password by default for authentication when creating new users, and the MariaDB client doesn't know how to do that. Changing to the mysql_native_password auth plugin is the fix.