Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rtillian opened this issue Oct 15, 2019 · 9 comments
Open

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

rtillian opened this issue Oct 15, 2019 · 9 comments
Labels

Comments

@rtillian
Copy link

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.

@dveeden
Copy link
Collaborator

dveeden commented Oct 16, 2019

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.

@LeeThompson
Copy link

LeeThompson commented Jan 2, 2021

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)

@rtillian
Copy link
Author

rtillian commented Feb 4, 2021

Lee, thank you very much!

@pjcs00
Copy link

pjcs00 commented Apr 8, 2022

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.

@hfga
Copy link

hfga commented Oct 7, 2022

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.

@alexandre1
Copy link

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

@dveeden
Copy link
Collaborator

dveeden commented Jan 3, 2023

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/

@genio
Copy link

genio commented Jan 3, 2023

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
Copy link

genio commented Jan 3, 2023

@LeeThompson The reasoning on the PATH can be found here: StrawberryPerl/Perl-Dist-Strawberry#11 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants