Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello

I have a new installation of MySQL 8.0 (Windows) and I try to connect to the database with DBI. I get the following error message DBI connect('MySQL80:localhost','root',...) failed: Authentication plugin 'caching_sha2_password' cannot be loaded. I read a bit on the Web: am I right that DBI still doesn't support this kind of authentication, which seems to be the standard in MySQL? Or it is me that is not able to find how to avoid this error?

Replies are listed 'Best First'.
Re: Authentication plugin 'caching_sha2_password' MySQL
by 1nickt (Canon) on Sep 28, 2018 at 16:57 UTC
Re: Authentication plugin 'caching_sha2_password' MySQL
by choroba (Cardinal) on Sep 28, 2018 at 19:24 UTC
    Note that DBD::mysql has some serious bugs in respect to MySQL clients 8.0+. You might be more lucky with DBD::MariaDB.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,