Sequenced steps to install Perl Strawberry, MySQL, and DBD::mysql on Windows XP
Asked Answered
T

4

9

I'm looking for a good guide with sequenced and detailed steps for installing Perl Strawberry, MySQL, and DBD::mysql on Windows XP.

The main goal I want to accomplish here is to have the ability to create databases and perform regular actions against them via Perl Strawberry using DBD::mysql

I've found this so far, but it's a little out-dated and I don't want to go through all that just to find out that it doesn't work.

The furthest I've gotten on my own (on another computer) is getting Perl Strawberry installed and to work properly, getting MySQL installed, and ATTEMPT to use cpan DBD::mysql to install the module (which failed because it couldn't find MySQL - I also tried the --with-mysql=C:\path\to\mysql option it suggests, but that does't work for me)

Thema answered 17/11, 2010 at 16:8 Comment(4)
i ended up using DBI insteadThema
You say "i ended up using DBI instead". That is an odd statement as DBI uses the appropriate DBD modules to communicate with a database. So, DBI would need DBD::mysql to be able to interface with a MySQL database.Conclusion
@Sinan - thats a key piece of info that i was lacking. i have use DBI; and DBI->connect('DBI:mysql:db','','',\%dbattr) so i thought the dbd was a different module altogether. thanks for clearing that upThema
.... wait, it looks like it is a different module. i still dont get it. but i do see a DBD folder inside of the DBI one.Thema
C
8

AFAIK, recent versions of Strawberry come bundled with DBD::mysql.

In addition, Strawberry Perl provides ppm to install precompiled binary packages.

Cullum answered 17/11, 2010 at 16:53 Comment(2)
Yes, StrawberryPerl comes bundled with drivers for MySQL, PostgreSQL and ODBC. Simply installing StrawberryPerl is enough.Photic
Actually it's not really recommended to use 'ppm' on Strawberry to install precompiled binaries, simply compile them yourself using cpan or cpanm and the bundled build tools.Photic
P
11

I wanted to install bugzilla on my local windows 7 machine and had a similar issue with mysql.

Although the automatic update mechanism of strawberry perl worked great and installed all missing packages, it seems that, as of a certain strawberry perl version (I used 5.16.1.1), the mysql driver has a problem.

I would get an error saying:

install_driver(mysql) failed: Can't load 'C:/Perl/site/lib/auto/DBD/mysql/mysql.dll' for module DBD::mysql: load_file:The specified module could not be found at C:/Perl/lib/DynaLoader.pm line 230. at (eval 34) line 3 Compilation failed in require at (eval 34) line 3.

But the required file was there, so after a lot of searching on the web, I found a solution in the comments section of an article (http://lpsolit.wordpress.com/2010/05/15/installing-dbdmysql-what-a-pain/):

"For the record, and thanks to glob, the way to fix the problem with Strawberry Perl is to copy C:\strawberry\c\bin\libmysql_.dll to C:\strawberry\perl\vendor\lib\auto\DBD\mysql\libmysql_.dll. Yay!"

It works !

I hope this helps other people who have the same issue.

Papain answered 4/10, 2012 at 8:30 Comment(1)
thanks that helped! I had checked the directory and seen a DLL in there but had no idea that the 2nd DLL needed to copied there too. As soon as I'd done it Bugzilla worked!Archdeaconry
C
8

AFAIK, recent versions of Strawberry come bundled with DBD::mysql.

In addition, Strawberry Perl provides ppm to install precompiled binary packages.

Cullum answered 17/11, 2010 at 16:53 Comment(2)
Yes, StrawberryPerl comes bundled with drivers for MySQL, PostgreSQL and ODBC. Simply installing StrawberryPerl is enough.Photic
Actually it's not really recommended to use 'ppm' on Strawberry to install precompiled binaries, simply compile them yourself using cpan or cpanm and the bundled build tools.Photic
T
0

If you're looking for a "just works" solution you could try ActivePerl, where you can install DBD::mysql as a precompiled binary via ppm.

Turney answered 17/11, 2010 at 16:34 Comment(0)
O
0

There's also DWIM Perl which contains many popular additional modules such as Moose, Dancer, Perl Critic, Perl Tidy, and even the Perl IDE - Padre.

It seems that using one of these installations is the easiest method - as you still get the benefits of having a working cpan and compiling most of your modules yourself for your perl. Last time I used activestate's perl + cpan I remember after installing some modules via cpan a bunch of stuff stopped working so I gave up on it. Installing all packages via ppm, or using their terrible ppm GUI manager, did not mesh well with me as regardless of the system I'm on I instinctively use cpanm and would like to have all my modules compiled/installed the Perl way.

Overanxious answered 2/10, 2012 at 13:21 Comment(1)
Looks like DWIM Perl has been abandoned perlmaven.com/dwimperlSharp

© 2022 - 2024 — McMap. All rights reserved.