glegg has asked for the wisdom of the Perl Monks concerning the following question:

I've installed perl 5.8.5, and am now getting a different problem with installing DBD::mysql. CPAN puts up a list of a couple thousand lines of errors which largely read
dbdimp.c:####: dereferencing pointer to incomplete type
Also there are numerous errors like
dbdimp.c: In function 'mysql_db_reconnect': dbdimp.c.2273: 'MYSQL undeclared (first use in this function)
Is the installation not finding MySQL? It's up and running when I try to install with CPAN. Thanks -Geoff

Replies are listed 'Best First'.
Re: DBD::mysql
by jdtoronto (Prior) on Oct 30, 2004 at 00:55 UTC
    As I recall there has been a series of problems with Red Hat distributions of Perl and modules. In fact I have had trouble with RH8, RH9, and RH Enterprise.

    In the end I have removed the RH Perl distribution, downloaded the source and compiled it for myself. After that, download MySQL and build it, make sure you have the MySQL client libraries installed then get DBD::mysql and build it.

    jdtoronto

Re: DBD::mysql
by pg (Canon) on Oct 29, 2004 at 23:13 UTC

    Do something like this:

    use DBI; use strict; use warnings; my $dbh = DBI->connect('DBI:mysql:test', 'root', '');
Re: DBD::mysql
by gaal (Parson) on Oct 30, 2004 at 07:14 UTC
    Why did you "force install" it? Were there any problems installing it regularly?
Re: DBD::mysql
by glegg (Initiate) on Nov 01, 2004 at 00:14 UTC
    Would I insert that code above line 129, or replace the line? I've heard something about Perl having problems coming with RH. Mysql is installed and up and running. I did have trouble installing DBD::mysql and so had to use force. Now even force doesn't work. How would I go about removing the existing Perl to install a new one? Are all of the directories pretty much contained in /usr/lib/perl5 ? Also where is the mSQL.xs located?
      I've installed perl 5.8.5, and am now getting a different problem with installing DBD::mysql. CPAN puts up a list of a couple thousand lines of errors which largely read
      dbdimp.c:####: dereferencing pointer to incomplete type
      Also there are numerous errors like
      dbdimp.c: In function 'mysql_db_reconnect': dbdimp.c.2273: 'MYSQL undeclared (first use in this function)
      Is the installation not finding MySQL? It's up and running when I try to install with CPAN.
        It seems you STILL haven't downloaded the client libraries for MySQL. DBD-MySQL requires certain library or header files from MySQL in order to be able to compile.

        Go to the MySQL site and download the appropriate file of 'libraries and headers' (usually around 2.6MB) for your version of MySQl. THEN try to compile DBD-mysql. It will probably work - it usually does.

        jdtoronto