Solved

installing Perl's DBD-mysql module on Cygwin

Posted on 2004-09-09
4
582 Views
Last Modified: 2008-02-01
I downloaded the DBD-mysql-2.9004 module from CPAN and am attempting to install it so that my Perl scripts running in the Cygwin environment can access an Mysql database. However, here's the output of my attempt to generate a Makefile, by having Perl interpret Makefile.PL:
~/mg/DBD-mysql-2.9004# perl Makefile.PL --cflags=-I/cygdrive/c/mysql/include
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Failed to determine directory of libmysqlclient.a|libmysqlclient.so. Use

  perl Makefile.PL "--libs=-L<dir> -lmysqlclient"

to set this directory. For details see the INSTALL.html file,
section "Linker flags" or type

  perl Makefile.PL --help
~/mg/DBD-mysql-2.9004#


The trouble is that I don't have any files on my hard drive named libmysqlclient.a or libmysqlclient.so. Any idea of how I can get solve or get around this?

Thanks.
0
Comment
Question by:bobwood2000
  • 3
4 Comments
 
LVL 26

Accepted Solution

by:
ushastry earned 250 total points
Comment Utility
Hi,

To install the DBI and DBD::mysql modules on a Unix-like OS or Perl on Windows installed as part of Cygwin, run the following commands.

Note that you must have MySQL already installed or you will not be able to install the DBD::mysql module. Also, if you haven’t installed any other modules this way, you’ll be asked for configuration options. Luckily, these are self-explanatory. Once you've finished entering the configuration values, the module installation will start.

perl –MCPAN –e 'install DBI'
perl –MCPAN –e 'install DBD::mysql'
You'll see several screens of text fly by, but eventually it should return you to the friendly command prompt.

take a look at fo more..

http://search.cpan.org/~jwied/DBD-mysql-2.1026/lib/DBD/mysql/INSTALL.pod
0
 

Author Comment

by:bobwood2000
Comment Utility
"perl –MCPAN –e 'install DBD::mysql' " gives me error messages, likely because CPAN isn't configured correctly. I think the problem is that my home directory has a space between my first and last name. CPAN doesn't seem to be able to deal with this. For example, the path should be /home/Robert Wood. CPAN prints: cannot open /home/Robert: no such file. I've tried changing where it stores files, but 'o conf' doesn't seem to make the right changes. Any advice?

Thanks.
0
 

Author Comment

by:bobwood2000
Comment Utility
Okay, I got CPAN(Plus) working. Install DBD::mysql via CPANPLUS gives me the same errors as when I was installing DBD::mysql manually.
0
 

Author Comment

by:bobwood2000
Comment Utility
I found the solution to this problem:

http://search.cpan.org/src/RUDY/DBD-mysql-2.9004/INSTALL.html#windows/cygwin

Amazingly, installing the DBD::mysql requires compiling MySQL within the Cygwin environment. It's crazy enough to work, and is probably the only way to do it.

Moderators: Please refund my points, but leave up this solution in case any one is searching for the same error messages I had. Thanks.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now