in reply to MySQL/MariaDB DBD install problem

I would first double check that the @INC variable contains the correct paths and then double check that mysql.pm is not in them with something like:
perl -wE 'for my $d (@INC) { -s "$d/DBD/mysql.pm" and say "$d/DBD/mysq +l.pm" }'
If it's not present I would go back to the original installation and figure out why they weren't installed. If they are supposed to be there but are not, then something may be wrong with your installation in general.

Also probably worth looking at perl -V | grep version to make sure you are using the perl you think you are using.

Replies are listed 'Best First'.
Re^2: MySQL/MariaDB DBD install problem
by ABayko (Novice) on Sep 23, 2024 at 22:18 UTC

    I tried the statement and it produced an error "Can't find string terminator "'" anywhere before EOF at -e on line 1." This was a cut and paste so the chance of a typo is low. Is this statement for linux? I am using windows command line.

      This is an example where I think a better idiom for telling people to run commands isn't to give them a shell-prompt starting point, but a Perl one, so here:
      $ perl -wE 'for my $d (@INC) { -s "$d/DBD/mysql.pm" and say "$d/DBD/my +sql.pm" }'
      would become:
      C:\strawberry>perl -de 0 Loading DB routines from perl5db.pl version 1.57 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. main::(-e:1): 0 [errors from Term::ReadKey to be ignored] DB<1> for my $d (@INC) { -s "$d/DBD/mysql.pm" and say "$d/DBD/mysql. +pm" } C:/strawberry/perl/vendor/lib/DBD/mysql.pm
      That would then be immune to the vagaries of Windows command lines.
      Yeah unfortunately the Windows command line doesn't treat ' as quote characters, so the whole thing would need to be inside double-quotes, and the perl strings within would need to be a different quoting syntax like qq{...}. The Windows command line is much less useful for one-liners than Bash. This is yet another good argument for Cygwin, since cygwin provides a fully unix-compatible terminal window.

      If you already have code written for Strawberry, though, switching to cygwin perl means you have to check all your usage paths to make sure they are forward-slashes.