install_driver(MariaDB) failed

Hi there,

I tried for serveral days to connect my perl-installation to the installed MariaDB. (see versions below).

I allways struggle with:

install_driver(MariaDB) failed: Can't load 'C:/Perl64/site/lib/auto/DBD/MariaDB/MariaDB.dll' for module DBD::MariaDB: load_file:Das angegebene Modul wurde nicht gefunden at C:/Perl64/lib/DynaLoader.pm line 193 at (eval 6) line 3.
Compilation failed in require at (eval 6) line 3.
Perhaps a required shared library or dll isn't installed where expected at temp.pl line 20.

my code is:

use strict;
use Data::Dumper;

print “VAR INC is:\n”;
for my $i (@INC) {
print “$i \n” ;
}
use DBI;

my @ary = DBI->available_drivers();
print “Available driver for DBI is:\n”;
for my $a (@ary) {
print $a.“\n”;
}

my $user = “root”;
my $password = “+++somepwd+++”;
my $dsn = “DBI:MariaDB:database=test;host=localhost”;
print “trying to connect to mariaDB via DBI-connect\n”;
my $dbh = DBI->connect($dsn, $user, $password, {AutoCommit=>1,RaiseError=>1,PrintError=>0});
print “DBI-connect tried\n”;

the output is:

perl -w temp.pl
install_driver(MariaDB) failed: Can’t load ‘C:/Perl64/site/lib/auto/DBD/MariaDB/MariaDB.dll’ for module DBD::MariaDB: load_file:Das angegebene Modul wurde nicht gefunden at C:/Perl64/lib/DynaLoader.pm line 193.
at (eval 6) line 3.
Compilation failed in require at (eval 6) line 3.
Perhaps a required shared library or dll isn’t installed where expected
at temp.pl line 20.
VAR INC is:
C:/Perl64/site/lib
C:/Perl64/lib
Available driver for DBI is:
CSV
DBM
ExampleP
File
Gofer
MariaDB
Mem
ODBC
Oracle
Pg
Proxy
SQLite
Sponge
mysql
trying to connect to mariaDB via DBI-connect
Exit code: 2

My Perl-Version:
C:\Windows\system32>perl -V
Summary of my perl5 (revision 5 version 28 subversion 1) configuration:

Platform:
osname=MSWin32
osvers=10.0.14393
archname=MSWin32-x64-multi-thread
uname=‘’
config_args=‘undef’
hint=recommended
useposix=true
d_sigaction=undef
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=undef
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler:
cc=‘undef’
ccflags =’ -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields’
optimize=‘-s -O2’
cppflags=‘-DWIN32’
ccversion=‘’
gccversion=‘4.6.3’
gccosandvers=‘’
intsize=4
longsize=4
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype=‘long long’
ivsize=8
nvtype=‘double’
nvsize=8
Off_t=‘long long’
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld=‘undef’
ldflags =‘-s -static-libgcc -static-libstdc++ -L"C:\Perl64\lib\CORE" -L"C:\MinGW\x86_64-w64-mingw32\lib"’
libpth=C:\MinGW\x86_64-w64-mingw32\lib
libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
libc=
so=dll
useshrplib=true
libperl=libperl528.a
gnulibc_version=‘’
Dynamic Linking:
dlsrc=dl_win32.xs
dlext=dll
d_dlsymun=undef
ccdlflags=’ ’
cccdlflags=’ ’
lddlflags=‘-mdll -s -static-libgcc -static-libstdc++ -L"C:\Perl64\lib\CORE" -L"C:\MinGW\x86_64-w64-mingw32\lib"’

Characteristics of this binary (from libperl):
Compile-time options:
HAS_TIMES
HAVE_INTERP_INTERN
MULTIPLICITY
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT
PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
USE_SITECUSTOMIZE
Locally applied patches:
ActivePerl Build 0000 [25391a6d]
Built under MSWin32
Compiled at Oct 28 2020 18:24:51
@INC:
C:/Perl64/site/lib
C:/Perl64/lib

Maria-Version:
C:\Windows\system32>mysql -V
mysql Ver 14.16 Distrib 5.2.14-MariaDB, for Win64 (x64)

Is there someone who knows, what I can do?

Best regards
Claus

Hi @claus-stahlberg ,

Thanks for writing! I’ll bet that the Platform doesn’t yet handle the needed MariaDB client library yet. I’ll ask the devs to take a look. Hopefully, it’ll be an easy fix, as we just handled a similar issue with MySQL.

In the meantime, you might just be able to get the needed DLL from another source and put it at that location.

Cheers!
–zak