[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

installing Perl's DBD-mysql module on Cygwin

Posted on 2004-09-09
4
Medium Priority
?
625 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:
Umesh earned 500 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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month18 days, 18 hours left to enroll

834 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