Solved

installing Perl's DBD-mysql module on Cygwin

Posted on 2004-09-09
4
588 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
ID: 12023909
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
ID: 12029871
"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
ID: 12036350
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
ID: 12036372
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Creating and Managing Databases with phpMyAdmin in cPanel.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

821 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