DBD-mysql icon indicating copy to clipboard operation
DBD-mysql copied to clipboard

DBD::mysql - mysql.xs.dll not found (Strawberry)

Open rtillian opened this issue 6 years ago • 9 comments
trafficstars

Connecting with my $dbh = DBI->connect( "DBI:mysql:$dbname:host=$hostname","$username", "$password", ..... results in install_driver(mysql) failed: Can't load 'c:/Strawberry/perl/vendor/lib/auto/DBD/mysql/mysql.xs.dll' for module DBD::mysql: load_file: The module not found at c:/Strawberry/perl/lib/DynaLoader.pm line 193.

Solution suggested in some places is: Copying C:\strawberry\c\bin\libmysql.dll_ to c:\strawberry\perl\vendor\lib\auto\mysql does not work in Release Strawberry 5.28.2. - This does not work.

My unusual solution was to copy libmysql_.dll from ActiveState 5.12 (yes, but I was in despair) to c:\strawberry\perl\vendor\lib\auto\mysql - But I think fixing this within the distribution (or Strawberry) should be better.

rtillian avatar Oct 15 '19 09:10 rtillian

I think this should be fixed in Strawberry. If there are things which can be done in the distribution please let me know. I'm not familiar with Perl on Windows.

dveeden avatar Oct 16 '19 07:10 dveeden

Having this problem on Windows 2008 R2 with Strawberry Perl strawberry-perl-5.30.3.1-64bit In my case, copying the libmysql.dll from/strawberry/c/bin worked.

What I don't get is /strawberry/c/bin is in the path.

NOTE: You can also make symlinks instead. (mklink libmysql.dll /strawberry/c/bin/libmysql.dll)

LeeThompson avatar Jan 02 '21 21:01 LeeThompson

Lee, thank you very much!

rtillian avatar Feb 04 '21 12:02 rtillian

I am also getting this error: Windows 11, Strawberry Perl 5.32.1.1. The problem is not that the file is missing: it is in the location specified in the error message, ie c:/Strawberry/perl/vendor/lib/auto/DBD/mysql/mysql.xs.dll . I have tried both 32 and 64 bit Strawberry Perl - both give the same error.

pjcs00 avatar Apr 08 '22 15:04 pjcs00

Mr. LeeThompson's solution worked for me.

For future reference, libmysql.dll should be copied to "C:/Strawberry/perl/vendor/lib/auto/DBD/mysql/" or to the same folder mysql.xs.dll, if you installed strawberry perl in a location other then the one selected by default.

hfga avatar Oct 07 '22 20:10 hfga

Hi I was attempting to download mysql-connector-c-6.1.11.zip but could not find any place. I need the mysql.xs.dll

alexandre1 avatar Jan 03 '23 03:01 alexandre1

Hi I was attempting to download mysql-connector-c-6.1.11.zip but could not find any place. I need the mysql.xs.dll

This should be available on https://downloads.mysql.com/archives/c-c/

dveeden avatar Jan 03 '23 11:01 dveeden

Strawberry ships with DBD::mysql and the mysql library. You shouldn't need to do anything. I suspect there's something else going on

genio avatar Jan 03 '23 13:01 genio

@LeeThompson The reasoning on the PATH can be found here: https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/11#issuecomment-674433024

genio avatar Jan 03 '23 13:01 genio