MySQL newbie: Failed to determine directory of mysql.h

MySQL newbie: Failed to determine directory of mysql.h

am 11.11.2004 17:06:55 von jose isaias cabrera

Greetings!

I am trying to connect from a unix server to a Windows 2000 MySQL server and
I am having problems with the DBD::mysql perl module. Here is the program:

#/h/jicman/bin/perl -w
use DBI;

my $h = 'sqlhost.mydsn.net';
my $dsn = "DBI:mysql:my_database:$h";
my $db_user_name = 'admin';
my $db_password = 'secret';
my ($id, $password);
my $dbh = DBI->connect($dsn, $db_user_name, $db_password);

and I get this error:


Using CPAN to download DBD::mysql driver, I get this error message:

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC
contains: /h/jicman/lib/perl5/5.8.5/sun4 /h/jicman/lib/perl5/5.8.5
/h/jicman/lib/perl5/5.8.5/sun4 /h/jicman/lib/perl5/site_perl/5.8.5
/h/jicman/lib/perl5/site_perl ~jicman/lib/perl .) at (eval 1) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Multiplex, Proxy, Sponge.
at Macros/MySQL.pl line 9

So, I go to CPAN and try to install that module

cpan> install DBD::mysql
CPAN: Storable loaded ok
Going to read /h/jicman/.cpan/Metadata
Database was generated on Wed, 03 Nov 2004 09:08:40 GMT
Running install for module DBD::mysql
Running make for R/RU/RUDY/DBD-mysql-2.9004.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for
/h/jicman/.cpan/sources/authors/id/R/RU/RUDY/DBD-mysql-2.900 4.tar.gz ok
x DBD-mysql-2.9004, 0 bytes, 0 tape blocks
x DBD-mysql-2.9004/t, 0 bytes, 0 tape blocks
x DBD-mysql-2.9004/t/mysql2.t, 4187 bytes, 9 tape blocks
x DBD-mysql-2.9004/t/akmisc.t, 27024 bytes, 53 tape blocks
....
....
x DBD-mysql-2.9004/ChangeLog, 40311 bytes, 79 tape blocks
x DBD-mysql-2.9004/constants.h, 1937 bytes, 4 tape blocks
x DBD-mysql-2.9004/TODO, 896 bytes, 2 tape blocks
Removing previously used /h/jicman/.cpan/build/DBD-mysql-2.9004

CPAN.pm: Going to build R/RU/RUDY/DBD-mysql-2.9004.tar.gz

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 mysql.h. Use

perl Makefile.PL --cflags=-I



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

perl Makefile.PL --help
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install

--

What can I do to fix this problem? Don't forget that I am working from an
Unix server without root password.

thanks,

josé


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

RE: MySQL newbie: Failed to determine directory of mysql.h

am 11.11.2004 19:26:21 von ppbenac

Jose,

This error indicates you do not have DBD::mysql installed or you =
don't
have it installed in the default locations. You need to install the =
MySQL
Bundle from CPAN into it's default location or use lib to tell your =
script
where to find it.

Regards,
Pete
----
Peter P. Benac, CCNA
Celtic Spirit Networking
Providing Network and Systems Project Management and Installation and =
Web
Hosting.
Phone: 919-618-2557
Web: http://www.emacolet.com
Need quick reliable Systems or Network Management advice visit
http://www.nmsusers.org

To have principles...
First have courage.. With principles comes integrity!!!




-----Original Message-----
From: jose isaias cabrera [mailto:jicman@cinops.xerox.com]=20
Sent: Thursday, November 11, 2004 11:07 AM
To: perl@lists.mysql.com
Subject: MySQL newbie: Failed to determine directory of mysql.h



Greetings!

I am trying to connect from a unix server to a Windows 2000 MySQL server =
and
I am having problems with the DBD::mysql perl module. Here is the =
program:

#/h/jicman/bin/perl -w
use DBI;

my $h =3D 'sqlhost.mydsn.net';
my $dsn =3D "DBI:mysql:my_database:$h";
my $db_user_name =3D 'admin';
my $db_password =3D 'secret';
my ($id, $password);
my $dbh =3D DBI->connect($dsn, $db_user_name, $db_password);

and I get this error:


Using CPAN to download DBD::mysql driver, I get this error message:

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC
contains: /h/jicman/lib/perl5/5.8.5/sun4 /h/jicman/lib/perl5/5.8.5
/h/jicman/lib/perl5/5.8.5/sun4 /h/jicman/lib/perl5/site_perl/5.8.5
/h/jicman/lib/perl5/site_perl ~jicman/lib/perl .) at (eval 1) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed, or =
perhaps
the capitalisation of 'mysql' isn't right. Available drivers: DBM, =
ExampleP,
File, Multiplex, Proxy, Sponge. at Macros/MySQL.pl line 9

So, I go to CPAN and try to install that module

cpan> install DBD::mysql
CPAN: Storable loaded ok
Going to read /h/jicman/.cpan/Metadata
Database was generated on Wed, 03 Nov 2004 09:08:40 GMT Running =
install
for module DBD::mysql Running make for R/RU/RUDY/DBD-mysql-2.9004.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for
/h/jicman/.cpan/sources/authors/id/R/RU/RUDY/DBD-mysql-2.900 4.tar.gz ok =
x
DBD-mysql-2.9004, 0 bytes, 0 tape blocks x DBD-mysql-2.9004/t, 0 bytes, =
0
tape blocks x DBD-mysql-2.9004/t/mysql2.t, 4187 bytes, 9 tape blocks x
DBD-mysql-2.9004/t/akmisc.t, 27024 bytes, 53 tape blocks ... ... x
DBD-mysql-2.9004/ChangeLog, 40311 bytes, 79 tape blocks x
DBD-mysql-2.9004/constants.h, 1937 bytes, 4 tape blocks x
DBD-mysql-2.9004/TODO, 896 bytes, 2 tape blocks Removing previously used
/h/jicman/.cpan/build/DBD-mysql-2.9004

CPAN.pm: Going to build R/RU/RUDY/DBD-mysql-2.9004.tar.gz

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 mysql.h. Use

perl Makefile.PL --cflags=3D-I



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

perl Makefile.PL --help
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install

--

What can I do to fix this problem? Don't forget that I am working from =
an
Unix server without root password.

thanks,

jos=E9


--=20
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: =
http://lists.mysql.com/perl?unsub=3Dppbenac@emacolet.com


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: MySQL newbie: Failed to determine directory of mysql.h

am 11.11.2004 19:33:56 von jose isaias cabrera

Thanks Peter, but when I try to install it from CPAN, it prints this error
message:


CPAN.pm: Going to build R/RU/RUDY/DBD-mysql-2.9004.tar.gz

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 mysql.h. Use

perl Makefile.PL --cflags=-I



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

perl Makefile.PL --help
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install

So, here is a better question: do I need to install the MySQL client on the
Unix server to be able to connect to MySQL server?



----- Original Message -----
From: "Peter P. Benac"
To: "'jose isaias cabrera'" ;

Sent: Thursday, November 11, 2004 1:26 PM
Subject: RE: MySQL newbie: Failed to determine directory of mysql.h


> Jose,
>
> This error indicates you do not have DBD::mysql installed or you don't
> have it installed in the default locations. You need to install the MySQL
> Bundle from CPAN into it's default location or use lib to tell your script
> where to find it.
>
> Regards,
> Pete
> ----
> Peter P. Benac, CCNA
> Celtic Spirit Networking
> Providing Network and Systems Project Management and Installation and Web
> Hosting.
> Phone: 919-618-2557
> Web: http://www.emacolet.com
> Need quick reliable Systems or Network Management advice visit
> http://www.nmsusers.org
>
> To have principles...
> First have courage.. With principles comes integrity!!!
>
>
>
>
> -----Original Message-----
> From: jose isaias cabrera [mailto:jicman@cinops.xerox.com]
> Sent: Thursday, November 11, 2004 11:07 AM
> To: perl@lists.mysql.com
> Subject: MySQL newbie: Failed to determine directory of mysql.h
>
>
>
> Greetings!
>
> I am trying to connect from a unix server to a Windows 2000 MySQL server
and
> I am having problems with the DBD::mysql perl module. Here is the
program:
>
> #/h/jicman/bin/perl -w
> use DBI;
>
> my $h = 'sqlhost.mydsn.net';
> my $dsn = "DBI:mysql:my_database:$h";
> my $db_user_name = 'admin';
> my $db_password = 'secret';
> my ($id, $password);
> my $dbh = DBI->connect($dsn, $db_user_name, $db_password);
>
> and I get this error:
>
>
> Using CPAN to download DBD::mysql driver, I get this error message:
>
> install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC
> contains: /h/jicman/lib/perl5/5.8.5/sun4 /h/jicman/lib/perl5/5.8.5
> /h/jicman/lib/perl5/5.8.5/sun4 /h/jicman/lib/perl5/site_perl/5.8.5
> /h/jicman/lib/perl5/site_perl ~jicman/lib/perl .) at (eval 1) line 3.
> Perhaps the DBD::mysql perl module hasn't been fully installed, or perhaps
> the capitalisation of 'mysql' isn't right. Available drivers: DBM,
ExampleP,
> File, Multiplex, Proxy, Sponge. at Macros/MySQL.pl line 9
>
> So, I go to CPAN and try to install that module
>
> cpan> install DBD::mysql
> CPAN: Storable loaded ok
> Going to read /h/jicman/.cpan/Metadata
> Database was generated on Wed, 03 Nov 2004 09:08:40 GMT Running install
> for module DBD::mysql Running make for R/RU/RUDY/DBD-mysql-2.9004.tar.gz
> CPAN: Digest::MD5 loaded ok
> Checksum for
> /h/jicman/.cpan/sources/authors/id/R/RU/RUDY/DBD-mysql-2.900 4.tar.gz ok x
> DBD-mysql-2.9004, 0 bytes, 0 tape blocks x DBD-mysql-2.9004/t, 0 bytes, 0
> tape blocks x DBD-mysql-2.9004/t/mysql2.t, 4187 bytes, 9 tape blocks x
> DBD-mysql-2.9004/t/akmisc.t, 27024 bytes, 53 tape blocks ... ... x
> DBD-mysql-2.9004/ChangeLog, 40311 bytes, 79 tape blocks x
> DBD-mysql-2.9004/constants.h, 1937 bytes, 4 tape blocks x
> DBD-mysql-2.9004/TODO, 896 bytes, 2 tape blocks Removing previously used
> /h/jicman/.cpan/build/DBD-mysql-2.9004
>
> CPAN.pm: Going to build R/RU/RUDY/DBD-mysql-2.9004.tar.gz
>
> 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 mysql.h. Use
>
> perl Makefile.PL --cflags=-I
>
> to set this directory. For details see the INSTALL.html file, section "C
> Compiler flags" or type
>
> perl Makefile.PL --help
> Running make test
> Make had some problems, maybe interrupted? Won't test
> Running make install
> Make had some problems, maybe interrupted? Won't install
>
> --
>
> What can I do to fix this problem? Don't forget that I am working from an
> Unix server without root password.
>
> thanks,
>
> josé
>
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?unsub=ppbenac@emacolet.com
>
>
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: MySQL newbie: Failed to determine directory of mysql.h

am 11.11.2004 20:09:38 von jose isaias cabrera

Pete,

if I may and with all due respect (and sorry for the lengthy emails), but
you're missing the point: I am trying to install DBD::mysql. Will you take
a look at this run of cpan to try to install DBD::mysql,

odouls 14:00:31-> cpan
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7601)
ReadLine support available (try 'install Bundle::CPAN')

cpan> install DBD::mysql
CPAN: Storable loaded ok
Going to read /h/jicman/.cpan/Metadata
Database was generated on Wed, 03 Nov 2004 09:08:40 GMT
Running install for module DBD::mysql
Running make for R/RU/RUDY/DBD-mysql-2.9004.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for
/h/jicman/.cpan/sources/authors/id/R/RU/RUDY/DBD-mysql-2.900 4.tar.gz ok
x DBD-mysql-2.9004, 0 bytes, 0 tape blocks
x DBD-mysql-2.9004/t, 0 bytes, 0 tape blocks
x DBD-mysql-2.9004/t/mysql2.t, 4187 bytes, 9 tape blocks
x DBD-mysql-2.9004/t/akmisc.t, 27024 bytes, 53 tape blocks
x DBD-mysql-2.9004/t/60leaks.t, 5228 bytes, 11 tape blocks
x DBD-mysql-2.9004/t/10dsnlist.t, 2019 bytes, 4 tape blocks
x DBD-mysql-2.9004/t/ak-dbd.t, 15573 bytes, 31 tape blocks
x DBD-mysql-2.9004/t/50chopblanks.t, 3926 bytes, 8 tape blocks
x DBD-mysql-2.9004/t/mysql.t, 19474 bytes, 39 tape blocks
x DBD-mysql-2.9004/t/lib.pl, 5588 bytes, 11 tape blocks
x DBD-mysql-2.9004/t/40blobs.t, 3507 bytes, 7 tape blocks
x DBD-mysql-2.9004/t/40nulls.t, 2591 bytes, 6 tape blocks
x DBD-mysql-2.9004/t/insertid.t, 1234 bytes, 3 tape blocks
x DBD-mysql-2.9004/t/40listfields.t, 4156 bytes, 9 tape blocks
x DBD-mysql-2.9004/t/40bindparam.t, 5388 bytes, 11 tape blocks
x DBD-mysql-2.9004/t/mysql.dbtest, 3683 bytes, 8 tape blocks
x DBD-mysql-2.9004/t/dbdadmin.t, 7700 bytes, 16 tape blocks
x DBD-mysql-2.9004/t/20createdrop.t, 1833 bytes, 4 tape blocks
x DBD-mysql-2.9004/t/00base.t, 989 bytes, 2 tape blocks
x DBD-mysql-2.9004/t/30insertfetch.t, 2624 bytes, 6 tape blocks
x DBD-mysql-2.9004/t/40numrows.t, 4232 bytes, 9 tape blocks
x DBD-mysql-2.9004/t/50commit.t, 6617 bytes, 13 tape blocks
x DBD-mysql-2.9004/t/mysql.mtest, 758 bytes, 2 tape blocks
x DBD-mysql-2.9004/MANIFEST, 601 bytes, 2 tape blocks
x DBD-mysql-2.9004/myld, 1425 bytes, 3 tape blocks
x DBD-mysql-2.9004/dbdimp.c, 68146 bytes, 134 tape blocks
x DBD-mysql-2.9004/lib, 0 bytes, 0 tape blocks
x DBD-mysql-2.9004/lib/DBD, 0 bytes, 0 tape blocks
x DBD-mysql-2.9004/lib/DBD/mysql, 0 bytes, 0 tape blocks
x DBD-mysql-2.9004/lib/DBD/mysql/GetInfo.pm, 16069 bytes, 32 tape blocks
x DBD-mysql-2.9004/lib/DBD/mysql/INSTALL.pod, 20584 bytes, 41 tape blocks
x DBD-mysql-2.9004/lib/DBD/mysql.pm, 47770 bytes, 94 tape blocks
x DBD-mysql-2.9004/lib/Mysql, 0 bytes, 0 tape blocks
x DBD-mysql-2.9004/lib/Mysql/Statement.pm, 3939 bytes, 8 tape blocks
x DBD-mysql-2.9004/lib/Bundle, 0 bytes, 0 tape blocks
x DBD-mysql-2.9004/lib/Bundle/DBD, 0 bytes, 0 tape blocks
x DBD-mysql-2.9004/lib/Bundle/DBD/mysql.pm, 417 bytes, 1 tape blocks
x DBD-mysql-2.9004/lib/Mysql.pm, 23888 bytes, 47 tape blocks
x DBD-mysql-2.9004/dbdimp.h, 6115 bytes, 12 tape blocks
x DBD-mysql-2.9004/mysql.xs, 8786 bytes, 18 tape blocks
x DBD-mysql-2.9004/MANIFEST.SKIP, 31 bytes, 1 tape blocks
x DBD-mysql-2.9004/README, 2716 bytes, 6 tape blocks
x DBD-mysql-2.9004/INSTALL.html, 26305 bytes, 52 tape blocks
x DBD-mysql-2.9004/META.yml, 381 bytes, 1 tape blocks
x DBD-mysql-2.9004/Makefile.PL, 8955 bytes, 18 tape blocks
x DBD-mysql-2.9004/ChangeLog, 40311 bytes, 79 tape blocks
x DBD-mysql-2.9004/constants.h, 1937 bytes, 4 tape blocks
x DBD-mysql-2.9004/TODO, 896 bytes, 2 tape blocks
Removing previously used /h/jicman/.cpan/build/DBD-mysql-2.9004

CPAN.pm: Going to build R/RU/RUDY/DBD-mysql-2.9004.tar.gz

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 mysql.h. Use

perl Makefile.PL --cflags=-I



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

perl Makefile.PL --help
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install

cpan>

now, as you can see, this is what I am trying to do, so it's not hidden
anywhere. It's just failing with "failed to determine directory of mysql.h.
I don't have any place where mysql.h is. So, I can't point to it. So, my
question is, do I need to install a client which would have this file
mysql.h, because I don't have it in my unix system. Also, if I display the
files where Makefile.PL is found,

odouls 14:01:44-> pwd
/h/jicman/.cpan/build/DBD-mysql-2.9004

odouls 14:01:54-> ls
ChangeLog* MANIFEST.SKIP* README* dbdimp.c* myld*
INSTALL.html* META.yml TODO dbdimp.h* mysql.xs*
MANIFEST* Makefile.PL* constants.h* lib/ t/

odouls 14:02:01->

there is no "mysql_config" in there. So... again, where are these files
suppose to be?

thanks.

----- Original Message -----
From: "Peter P. Benac"
To: "'jose isaias cabrera'" ;

Sent: Thursday, November 11, 2004 1:26 PM
Subject: RE: MySQL newbie: Failed to determine directory of mysql.h


> Jose,
>
> This error indicates you do not have DBD::mysql installed or you don't
> have it installed in the default locations. You need to install the MySQL
> Bundle from CPAN into it's default location or use lib to tell your script
> where to find it.
>
> Regards,
> Pete
> ----
> Peter P. Benac, CCNA
> Celtic Spirit Networking
> Providing Network and Systems Project Management and Installation and Web
> Hosting.
> Phone: 919-618-2557
> Web: http://www.emacolet.com
> Need quick reliable Systems or Network Management advice visit
> http://www.nmsusers.org
>
> To have principles...
> First have courage.. With principles comes integrity!!!
>
>
>
>
> -----Original Message-----
> From: jose isaias cabrera [mailto:jicman@cinops.xerox.com]
> Sent: Thursday, November 11, 2004 11:07 AM
> To: perl@lists.mysql.com
> Subject: MySQL newbie: Failed to determine directory of mysql.h
>
>
>
> Greetings!
>
> I am trying to connect from a unix server to a Windows 2000 MySQL server
and
> I am having problems with the DBD::mysql perl module. Here is the
program:
>
> #/h/jicman/bin/perl -w
> use DBI;
>
> my $h = 'sqlhost.mydsn.net';
> my $dsn = "DBI:mysql:my_database:$h";
> my $db_user_name = 'admin';
> my $db_password = 'secret';
> my ($id, $password);
> my $dbh = DBI->connect($dsn, $db_user_name, $db_password);
>
> and I get this error:
>
>
> Using CPAN to download DBD::mysql driver, I get this error message:
>
> install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC
> contains: /h/jicman/lib/perl5/5.8.5/sun4 /h/jicman/lib/perl5/5.8.5
> /h/jicman/lib/perl5/5.8.5/sun4 /h/jicman/lib/perl5/site_perl/5.8.5
> /h/jicman/lib/perl5/site_perl ~jicman/lib/perl .) at (eval 1) line 3.
> Perhaps the DBD::mysql perl module hasn't been fully installed, or perhaps
> the capitalisation of 'mysql' isn't right. Available drivers: DBM,
ExampleP,
> File, Multiplex, Proxy, Sponge. at Macros/MySQL.pl line 9
>
> So, I go to CPAN and try to install that module
>
> cpan> install DBD::mysql
> CPAN: Storable loaded ok
> Going to read /h/jicman/.cpan/Metadata
> Database was generated on Wed, 03 Nov 2004 09:08:40 GMT Running install
> for module DBD::mysql Running make for R/RU/RUDY/DBD-mysql-2.9004.tar.gz
> CPAN: Digest::MD5 loaded ok
> Checksum for
> /h/jicman/.cpan/sources/authors/id/R/RU/RUDY/DBD-mysql-2.900 4.tar.gz ok x
> DBD-mysql-2.9004, 0 bytes, 0 tape blocks x DBD-mysql-2.9004/t, 0 bytes, 0
> tape blocks x DBD-mysql-2.9004/t/mysql2.t, 4187 bytes, 9 tape blocks x
> DBD-mysql-2.9004/t/akmisc.t, 27024 bytes, 53 tape blocks ... ... x
> DBD-mysql-2.9004/ChangeLog, 40311 bytes, 79 tape blocks x
> DBD-mysql-2.9004/constants.h, 1937 bytes, 4 tape blocks x
> DBD-mysql-2.9004/TODO, 896 bytes, 2 tape blocks Removing previously used
> /h/jicman/.cpan/build/DBD-mysql-2.9004
>
> CPAN.pm: Going to build R/RU/RUDY/DBD-mysql-2.9004.tar.gz
>
> 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 mysql.h. Use
>
> perl Makefile.PL --cflags=-I
>
> to set this directory. For details see the INSTALL.html file, section "C
> Compiler flags" or type
>
> perl Makefile.PL --help
> Running make test
> Make had some problems, maybe interrupted? Won't test
> Running make install
> Make had some problems, maybe interrupted? Won't install
>
> --
>
> What can I do to fix this problem? Don't forget that I am working from an
> Unix server without root password.
>
> thanks,
>
> josé
>
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?unsub=ppbenac@emacolet.com
>
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe:
http://lists.mysql.com/perl?unsub=jicman@cinops.xerox.com
>
>
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: MySQL newbie: Failed to determine directory of mysql.h

am 12.11.2004 08:36:57 von Peter Pentchev

--O5XBE6gyVG5Rl6Rj
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Nov 11, 2004 at 11:06:55AM -0500, jose isaias cabrera wrote:
>=20
> Greetings!
>=20
> I am trying to connect from a unix server to a Windows 2000 MySQL server =
and
> I am having problems with the DBD::mysql perl module. Here is the progra=
m:
[snip program]
> install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC
[snip the rest of the error message]
>=20
> So, I go to CPAN and try to install that module
>=20
> cpan> install DBD::mysql
[snip]
> CPAN.pm: Going to build R/RU/RUDY/DBD-mysql-2.9004.tar.gz
>=20
> 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.
[snip]
> Failed to determine directory of mysql.h. Use

Yes, as you guessed correctly in the other message, since you have
neither mysql_config nor mysql.h on your system, this means that the
system is missing the MySQL client libraries.

What you need to do now is fetch the MySQL client source from
http://www.mysql.com/ (I personally would recommend version 4.0 or 4.1),
then compile and install them in your home dir (the MySQL configure
script honors the --prefix option, so you would want to configure it
with --prefix=3D/h/jicman). After that, if /h/jicman/bin/ is in your
PATH, the DBD::mysql configuration should be able to find the
mysql_config binary, which would tell it where to find the MySQL header
files and libraries.

Hope this helps.

G'luck,
Peter

--=20
Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org
PGP key: http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553
If there were no counterfactuals, this sentence would not have been paradox=
ical.

--O5XBE6gyVG5Rl6Rj
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBlGgZ7Ri2jRYZRVMRAriVAJ9TEbWJBJtNGbSO1j0gKT0FkEH0aACf Q9Yo
JQOBPY9bwX21/dn1op163dc=
=YgYQ
-----END PGP SIGNATURE-----

--O5XBE6gyVG5Rl6Rj--