DBD::mysql error in ActivePerl 5.28 on Windws10 64bits, Can't load mysql.dll

I installed the new ActiveState Perl custom build with Perl 5.28 and I added the module (DBD-mysql v4.50) and the DBI module.

This is just an upgrade from version 5.20.2.2002. Nothing else changed. I’m running existing scripts that work fine if I go back to this older version of ActivePerl.

Here is the error I get when executing the script:

install_driver(mysql) failed: Can't load 'C:/Perl64/site/lib/auto/DBD/mysql/mysql.dll' for module DBD::mysql: load_file:The specified module could not be found at C:/Perl64/lib/DynaLoader.pm line 193.
  at (eval 11) line 3.
Compilation failed in require at (eval 11) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at C:\E22_TE~1\ICTDEV~1\Scripts\UPDATE~1.PL line 136.strong text

The file C:/Perl64/site/lib/auto/DBD/mysql/mysql.dll Exist

Any ideas?

I didn’t include any code since the module just does not load.

That looks like the system can’t find the MySQL client that the Perl DB driver dll needs for talking to the MySQL servers.

Perl gives that sort of error because it hands off to the system. If it has handed off to the system, and the system fails, the last known Perl statement is the only information Perl can give you.

You might have switched from a 32-bit 5.20 to a 64 bit 5.28, or you might have been using a different version of MySQL than what is needed now. 5.28 needs an exact match.

Make sure you have the 64-bit version of the library for mysql-5.7.16 installed, and on the $PATH where it can be loaded.

1 Like

Yup, that’s it… 32 bit vs 64 bit versions. Thanks for the help.