Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

DBI upgrade with cpanm fails

by cormanaz (Deacon)
on Nov 02, 2021 at 21:14 UTC ( [id://11138352]=perlquestion: print w/replies, xml ) Need Help??

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

Hi all. I have a new server that has MySQL 8.0.27. Trying to access that remotely via DBI (running script on Windows) and an getting an error: DBI connect(...) failed: Client does not support authentication protocol requested by server and it suggests to upgrade DBI.

I have 1.622 and there is a 1.636 available. When I try to upgrade it using cpanm it fails and the log lists a bunch of failed tests:

Test Summary Report ------------------- t/01basics.t (Wstat: 9728 Tests: 128 Failed: 0) Non-zero exit status: 38 Parse errors: Bad plan. You planned 130 tests but ran 128. t/09trace.t (Wstat: 9728 Tests: 1 Failed: 0) Non-zero exit status: 38 Parse errors: Bad plan. You planned 99 tests but ran 1. t/10examp.t (Wstat: 10240 Tests: 60 Failed: 0) Non-zero exit status: 40 Parse errors: Bad plan. You planned 242 tests but ran 60. t/19fhtrace.t (Wstat: 9728 Tests: 4 Failed: 0) Non-zero exit status: 38 Parse errors: Bad plan. You planned 27 tests but ran 4. t/31methcache.t (Wstat: 10240 Tests: 8 Failed: 0) Non-zero exit status: 40 Parse errors: Bad plan. You planned 49 tests but ran 8. t/40profile.t (Wstat: 9728 Tests: 0 Failed: 0) Non-zero exit status: 38 Parse errors: Bad plan. You planned 60 tests but ran 0. t/43prof_env.t (Wstat: 9728 Tests: 11 Failed: 0) Non-zero exit status: 38 t/zvg_01basics.t (Wstat: 9728 Tests: 128 Failed: 0) Non-zero exit status: 38 Parse errors: Bad plan. You planned 130 tests but ran 128. t/zvg_09trace.t (Wstat: 9728 Tests: 1 Failed: 0) Non-zero exit status: 38 Parse errors: Bad plan. You planned 99 tests but ran 1. t/zvg_10examp.t (Wstat: 10240 Tests: 60 Failed: 0) Non-zero exit status: 40 Parse errors: Bad plan. You planned 242 tests but ran 60. t/zvg_19fhtrace.t (Wstat: 9728 Tests: 4 Failed: 0) Non-zero exit status: 38 Parse errors: Bad plan. You planned 27 tests but ran 4. t/zvg_31methcache.t (Wstat: 10240 Tests: 8 Failed: 0) Non-zero exit status: 40 Parse errors: Bad plan. You planned 49 tests but ran 8. t/zvg_40profile.t (Wstat: 9728 Tests: 0 Failed: 0) Non-zero exit status: 38 Parse errors: Bad plan. You planned 60 tests but ran 0. t/zvg_43prof_env.t (Wstat: 9728 Tests: 11 Failed: 0) Non-zero exit status: 38 Files=202, Tests=7447, 72 wallclock secs ( 0.70 usr + 0.34 sys = 1.0 +5 CPU) Result: FAIL Failed 14/202 test programs. 0/7447 subtests failed. dmake.exe: Error code 255, while making 'test_dynamic'
It says I can force install but I'm reluctant to do this for fear of breaking my existing DBI install. How do I fix this?

Replies are listed 'Best First'.
Re: DBI upgrade with cpanm fails
by syphilis (Archbishop) on Nov 02, 2021 at 23:55 UTC
    I have 1.622 and there is a 1.636 available.

    Latest available on CPAN is 1.643. Have you tried it ?

    Other than that, the first thing is to find out why all of those scripts croaked. (It's likely the same or very similar reason for all of the failures.)
    I would cd to the build directory and run perl -Mblib t/01basics.t and see what that throws up. Hopefully it will show some diagnostics that help explain what's going on.
    Those same diagnostics would probably have also shown up during the 'make test' phase - so you could look there, too, if you still have that output.

    Cheers,
    Rob
Re: DBI upgrade with cpanm fails
by Tux (Canon) on Nov 03, 2021 at 08:44 UTC

    Also consider an attempt to install DBD::MariaDB *before* upgrading your DBI and then update your scripts to use dbi:MariaDB: instead of dbi:mysql: AND TEST


    Enjoy, Have FUN! H.Merijn
Re: DBI upgrade with cpanm fails
by NERDVANA (Deacon) on Nov 03, 2021 at 04:33 UTC
    Technically the package responsible for connection protocols would be DBD::mysql, which hasn't had a release since 2019. But that module also lists MySQL 8.0 in the changes file, so it's at least known to work with the latest major release of mysql.

    You might also consider relaxing the connection requirements on the server. I'm assuming they are forcing SSL by default? If you have a highly trusted network between your client and the server (such as 2 hosts with a shared vlan inside a firewalled data center) you could disable SSL for a small speed boost. Or, maybe it is some detail like requiring the latest TLS with the latest elliptic curve algorithm or something, and maybe you could relax that to more traditional algorithms.

Re: DBI upgrade with cpanm fails
by perlfan (Vicar) on Nov 03, 2021 at 06:39 UTC
    Is the normal mysql cli client installed and working as expected?
      Yes. In fact I can connect to MySQL 8.0 on localhost. This problem is happening on a remote db. I wonder if the port is blocked or something.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11138352]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2024-04-24 14:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found