Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)

like image 840
CheeseConQueso Avatar asked Nov 17 '10 16:11

CheeseConQueso


People also ask

Where is Strawberry Perl installed?

During installation, we recommend installing it in C:\Strawberry . This is the default for the MSI package. Connect your computer to the Internet so you are able download any required Perl modules from CPAN. For more information, see Section 2.1.

What is DBD MySQL?

DBD::mysql is the driver for connecting to MySQL database servers with DBI. DBI is the basic abstraction layer for working with databases in Perl. DBD::mysql is the driver for using MySQL with DBI.


2 Answers

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.

like image 77
Andrei Avatar answered Oct 29 '22 18:10

Andrei


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

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

like image 7
Sinan Ünür Avatar answered Oct 29 '22 18:10

Sinan Ünür