Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

DBD-mysql stubbornly refusing to install

by jfrm (Monk)
on Oct 31, 2018 at 19:54 UTC ( #1225016=perlquestion: print w/replies, xml ) Need Help??

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

I know this is not the first time this has cropped up and I know Michiel Beijen says it's easy but it surely isn't for me. I have done some serious searching; tried a lot of suggestions from various places without success before posting. Many hours wasted so far. I've got Windows 10 with latest updates, Mysql community-8.0.12.0 and I've installed Strawberry Perl 5.28.0.1-64bit. I also install Rose:DB and Image::Magick. Updated to latest DBI and DBD-mysql. When I attempt to use it I get:
install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted. Compilation failed in require at (eval 456) line 3. at (eval 456) line 3. eval 'package # hide from PAUSE DBI::_firesafe; # just in case require DBD::mysql; # load the driver ' called at C:/Strawberry/perl/vendor/lib/DBI.pm line 789
I did then uninstall Strawberry Perl and tried with Activestate Perl. Although DBD-mysql worked, ASPerl gave me problems with Image::Magick that I couldn't resolve. But I noticed that ImageMagick actually has a download specifically for Strawberry Perl so thought to try again as surely something so basic and important could be made to work. Uninstalled AS Perl and reinstalled Strawberry Perl. Based on the page, by Michiel Beijen, I tried without first upgrading DBI and DBD-mysql as apparently the DBD-mysql that comes with the distribution should just work without further ado. Not true. So then I tried to install using his instructions. Again, no good. Can't make head or tail of the output but anyway, his page is clearly out of date as it refers to an older version of DBD-mysql 4.029 whereas current version is 4.048. And when I tried to run the dmake part of it, it told me this was obsolete and I should use gmake. It would be nice if Michael or some other master of DBD-mysql can write a new install page to help grasshoppers such as myself... The situation seems hopeless but if anyone has any other suggestions, I'd be most grateful. From the output from perl Makefile.pl --mysql_config=c:\Strawberry\c\bin\mysql_config.bat, I have pulled out the following issues that may have a bearing on the matter:
Writing Makefile for DBD::mysql "\x{0159}" does not map to cp850 at C:/Strawberry/perl/lib/ExtUtils/Ma +keMaker.pm line 1268. "\x{0159}" does not map to cp850 at C:/Strawberry/perl/lib/ExtUtils/Ma +keMaker.pm line 1268. "\x{0159}" does not map to cp850 at C:/Strawberry/perl/lib/ExtUtils/Ma +keMaker.pm line 1268. C:\Strawberry\perl\vendor\lib\auto\DBI/dbipport.h:4471:0: warning: "WI +DEST_UTYPE" redefined # define WIDEST_UTYPE U64TYPE dbdimp.c: In function 'mysql_st_prepare': dbdimp.c:3200:24: warning: assignment from incompatible pointer type [ +-Wincompatible-pointer-types] bind->is_null= (_Bool*) &(fbind->is_null); Warning: duplicate function definition 'do' detected in mysql.xs, line + 247 Warning: duplicate function definition 'rows' detected in mysql.xs, li +ne 680 In file included from C:\STRAWB~1\perl\lib\CORE/perl.h:2465:0, from C:\Strawberry\perl\vendor\lib\auto\DBI/DBIXS.h:2 +3, from dbdimp.h:20, from mysql.xs:12: C:\STRAWB~1\perl\lib\CORE/handy.h:1064:0: note: this is the location o +f the previous definition # define WIDEST_UTYPE U64

Replies are listed 'Best First'.
Re: DBD-mysql stubbornly refusing to install
by choroba (Archbishop) on Oct 31, 2018 at 20:33 UTC
    DBD::mysql has problems with clients version 8+. Could you try installing DBD::MariaDB instead? It's a fork of the former module that fixes compatibility with the recent clients among other things.

    ($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,
      Thanks for that insight which explains a lot. I would be very happy to try DBD::MariaDB (of which I was unaware until you wrote so thanks again) but I'm not sure if it's compatible with Rose::DB::Object or indeed how to configure Rose to use it. Does anyone know?
        I haven't used Rose::DB ever, but from the documentation it seems you'd have to copy Rose::DB::MySQL to Rose::DB::MariaDB and use the driver_class method to enable it. If you decide to go that path, don't forget to post the traps and discoveries you make :-)

        Update: See also Bug #125886.

        ($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,

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2022-06-29 01:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (94 votes). Check out past polls.

    Notices?