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

hi all
I am trying to install DBD-mysql-4.003 for bugzilla 3.0 installation.

Os Version information is as below.

Red Hat Enterprise Linux AS release 3 (Taroon Update 4)

Linux localhost.localdomain 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i 686 i686 i386 GNU/Linux

MYSQL version installed is 4.1.22

Upon manually installing the DBD::mysql version, I am getting the following error message.

[root@localhost DBD-mysql-4.003]# export LANG=C [root@localhost DBD-mysql-4.003]# perl Makefile.PL

I will use the following settings for compiling and testing:

cflags (mysql_config) = -I/usr/include/mysql -g -pipe -march=i386 -mcp +u=i686 embedded (mysql_config) = libs (mysql_config) = -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl + -lm mysql_config (guessed ) = mysql_config nocatchstderr (default ) = 0 nofoundrows (default ) = 0 ssl (guessed ) = 0 testdb (default ) = test testhost (default ) = testpassword (default ) = testsocket (default ) = testuser (default ) = To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'. Multiple copies of Driver.xst found in: /usr/lib/perl5/site_perl/5.8.0 +/i386-linu x-thread-multi/auto/DBI/ /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-t +hread-mult i/auto/DBI/ at Makefile.PL line 738 Using DBI 1.58 (for perl 5.008 on i386-linux-thread-multi) installed i +n /usr/lib /perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI/ Writing Makefile for DBD::mysql [root@localhost DBD-mysql-4.003]# make gcc -c -I/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/D +BI -I/usr /include/mysql -g -pipe -march=i386 -mcpu=i686 -DDBD_MYSQL_INSERT_ID_I +S_GOOD -g -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict +-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr +/include/ gdbm -O2 -g -pipe -march=i386 -mcpu=i686 -DVERSION=\"4.003\" -DXS_VERS +ION=\"4. 003\" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" dbdi +mp.c gcc -c -I/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/D +BI -I/usr /include/mysql -g -pipe -march=i386 -mcpu=i686 -DDBD_MYSQL_INSERT_ID_I +S_GOOD -g -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict +-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr +/include/ gdbm -O2 -g -pipe -march=i386 -mcpu=i686 -DVERSION=\"4.003\" -DXS_VERS +ION=\"4. 003\" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" mysq +l.c Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.so LD_RUN_PATH="/usr/lib/mysql:/lib" /usr/bin/perl myld gcc -shared -L/us +r/local/l ib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/lib/my +sql -lm ysqlclient -lz -lcrypt -lnsl -lm chmod 755 blib/arch/auto/DBD/mysql/mysql.so cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs chmod 644 blib/arch/auto/DBD/mysql/mysql.bs Manifying blib/man3/DBD::mysql.3pm Manifying blib/man3/DBD::mysql::INSTALL.3pm Manifying blib/man3/Bundle:BD::mysql.3pm [root@localhost DBD-mysql-4.003]# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/00base.............ok t/10dsnlist..........DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/10dsnlist.t line 45 Cannot connect: Access denied for user 'root'@'localhost' (using passw +ord: NO) Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry. t/10dsnlist..........dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 1-9 Failed 9/9 tests, 0.00% okay t/20createdrop.......DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/20createdrop.t line 45 Cannot connect: Access denied for user 'root'@'localhost' (using passw +ord: NO) Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry. t/20createdrop.......dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 1-6 Failed 6/6 tests, 0.00% okay t/30insertfetch......DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/30insertfetch.t line 48 Cannot connect: Access denied for user 'root'@'localhost' (using passw +ord: NO) Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry. t/30insertfetch......dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 1-11 Failed 11/11 tests, 0.00% okay t/35limit............DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/35limit.t line 50 Cannot connect: Access denied for user 'root'@'localhost' (using passw +ord: NO) Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry. t/35limit............dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 1-113 Failed 113/113 tests, 0.00% okay t/35prepare..........DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/35prepare.t line 35 t/35prepare..........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-40 Failed 40/40 tests, 0.00% okay t/40bindparam........DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/40bindparam.t line 57 t/40bindparam........dubious Test returned status 255 (wstat 65280, 0xff00) t/40bindparam2.......DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/40bindparam2.t line 64 Cannot connect: Access denied for user 'root'@'localhost' (using passw +ord: NO) Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry. t/40bindparam2.......dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 1-13 Failed 13/13 tests, 0.00% okay t/40blobs............DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/40blobs.t line 64 Cannot connect: Access denied for user 'root'@'localhost' (using passw +ord: NO) Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry. t/40blobs............dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 1-11 Failed 11/11 tests, 0.00% okay t/40catalog..........DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/40catalog.t line 22 # Looks like your test died before it could output anything. t/40catalog..........dubious Test returned status 255 (wstat 65280, 0xff00) t/40listfields.......DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/40listfields.t line 57 Cannot connect: Access denied for user 'root'@'localhost' (using passw +ord: NO) Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry. t/40listfields.......dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 1-19 Failed 19/19 tests, 0.00% okay t/40nulls............DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/40nulls.t line 50 Cannot connect: Access denied for user 'root'@'localhost' (using passw +ord: NO) Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry. t/40nulls............dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 1-11 Failed 11/11 tests, 0.00% okay t/40numrows..........DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/40numrows.t line 59 Cannot connect: Access denied for user 'root'@'localhost' (using passw +ord: NO) Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry. t/40numrows..........dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 1-25 Failed 25/25 tests, 0.00% okay t/41bindparam........DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/41bindparam.t line 37 t/41bindparam........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-11 Failed 11/11 tests, 0.00% okay t/41blobs_prepare....DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/41blobs_prepare.t line 71 Cannot connect: Access denied for user 'root'@'localhost' (using passw +ord: NO) Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry. t/41blobs_prepare....dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 1-24 Failed 24/24 tests, 0.00% okay t/42bindparam........DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/42bindparam.t line 37 t/42bindparam........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-11 Failed 11/11 tests, 0.00% okay t/50chopblanks.......DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/50chopblanks.t line 57 Cannot connect: Access denied for user 'root'@'localhost' (using passw +ord: NO) Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry. t/50chopblanks.......dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 1-35 Failed 35/35 tests, 0.00% okay t/50commit...........DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/50commit.t line 64 Can't call method "tables" on an undefined value at t/lib.pl line 234. t/50commit...........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-30 Failed 30/30 tests, 0.00% okay t/60leaks............skipped all skipped: $ENV{SLOW_TESTS} is not set t/70takeimp..........skipped all skipped: test feature not implemented t/75supported_sql....DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/75supported_sql.t line 35 t/75supported_sql....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-17 Failed 17/17 tests, 0.00% okay t/80procs............DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/80procs.t line 32 t/80procs............dubious Test returned status 255 (wstat 65280, 0xff00) t/insertid...........DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/insertid.t line 14 t/insertid...........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-16 Failed 16/16 tests, 0.00% okay t/param_values.......DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/param_values.t line 16 Can't call method "tables" on an undefined value at t/lib.pl line 234. t/param_values.......dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-8 Failed 8/8 tests, 0.00% okay t/prepare_noerror....DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/prepare_noerror.t line 22 Can't call method "prepare" on an undefined value at t/prepare_noerror +.t line 25 . t/prepare_noerror....dubious Test returned status 255 (wstat 65280, 0xff00) t/texecute...........DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/texecute.t line 17 Can't call method "tables" on an undefined value at t/lib.pl line 234. t/texecute...........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-9 Failed 9/9 tests, 0.00% okay t/utf8...............DBI connect('test','',...) failed: Access denied +for user ' root'@'localhost' (using password: NO) at t/utf8.t line 49 t/utf8...............dubious Test returned status 255 (wstat 65280, 0xff00) Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/10dsnlist.t 10 2560 9 9 100.00% 1-9 t/20createdrop.t 10 2560 6 6 100.00% 1-6 t/30insertfetch.t 10 2560 11 11 100.00% 1-11 t/35limit.t 10 2560 113 113 100.00% 1-113 t/35prepare.t 255 65280 40 40 100.00% 1-40 t/40bindparam.t 255 65280 ?? ?? % ?? t/40bindparam2.t 10 2560 13 13 100.00% 1-13 t/40blobs.t 10 2560 11 11 100.00% 1-11 t/40catalog.t 255 65280 ?? ?? % ?? t/40listfields.t 10 2560 19 19 100.00% 1-19 t/40nulls.t 10 2560 11 11 100.00% 1-11 t/40numrows.t 10 2560 25 25 100.00% 1-25 t/41bindparam.t 255 65280 11 11 100.00% 1-11 t/41blobs_prepare.t 10 2560 24 24 100.00% 1-24 t/42bindparam.t 255 65280 11 11 100.00% 1-11 t/50chopblanks.t 10 2560 35 35 100.00% 1-35 t/50commit.t 255 65280 30 30 100.00% 1-30 t/75supported_sql.t 255 65280 17 17 100.00% 1-17 t/80procs.t 255 65280 ?? ?? % ?? t/insertid.t 255 65280 16 16 100.00% 1-16 t/param_values.t 255 65280 8 8 100.00% 1-8 t/prepare_noerror.t 255 65280 ?? ?? % ?? t/texecute.t 255 65280 9 9 100.00% 1-9 t/utf8.t 255 65280 ?? ?? % ?? 2 tests skipped. Failed 24/27 test scripts, 11.11% okay. 419/424 subtests failed, 1.18% + okay. make: *** [test_dynamic] Error 2

Any help on this regard, is greatly appreciated.

Note: I am very new to linux, perl and the installation part on it. I request, to provide every detail step of the solution

regards,
Tejas

20070705 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips

Replies are listed 'Best First'.
Re: DBD::mysql 4.003 installation failed
by jZed (Prior) on Jul 05, 2007 at 06:24 UTC
    Please put <code>...</code> tags around your post so we can read it. Do you have the mysql server installed? You need to install it before installing the client (DBD::mysql). Did you read the readme for DBD::mysql? You may need to set some environment vars so it knows where to find the server in order to run the tests.

    update ah, ok, now that Corion put code tags I can see that not having the mysql server is definitely your problem. If it's not installed (try "which mysql" to see if it's installed) then you can probably use yum to install it.

      I am usually a big fan of installing most things through CPAN. Nevertheless, if you are installing an application like Bugzilla, you should always try to install the binary versions of the Perl Libs as distributed by your distro, and only if those should not work, should you try to do it yourself (especially for modules that need compiling).

      If you would have installed the binary dbd for mysql, the rpm dependencies should have warned about mysql not being installed.

      I use Debian and they have a clear Perl Policy, don't know about RH. But derived from my experience, it is best to install the binary packages from your distro for _most_ of your Perl needs, and only use cpan for special versions needs or for special purposes, like Catalyst development for example.

      Best, Alejandro
Re: DBD::mysql 4.003 installation failed
by quester (Vicar) on Jul 05, 2007 at 08:15 UTC
    >> Red Hat Enterprise Linux AS release 3 (Taroon Update 4)

    Update 4 was released in December 2004, which would put you two and a half years behind on patches. Update 9, which is the last update for Release 3, has been out for several weeks now. (Security patches and some bug fixes will continue until October 2010, according to the Red Hat errata policy page, although they won't be rolled up into "updates".)

    You really should make some time to backup your server and get cozy with the up2date command Real Soon Now. You really don't want to discover that you've been 0wned because of a missed security patch.

      Thank you all, I was able to install it successfully...
Re: DBD::mysql 4.003 installation failed
by jeanluca (Deacon) on Jul 05, 2007 at 07:11 UTC
    As jZed suggests, make sure you have mysql installed. Furthermore, I would also make sure that the server is up and running + you have a root account without a password. Then it will install without any errors!

    LuCa
      Thanks for your reply. I have installed mysql 4.1.22 version and am also able to login using the root pwd for mysql. I tried installing it using the CPAN mode. but it gives me an error saying ...'no host found'...may be because of the firewall. So had to install it manually using tar files. what should I do?..please suggest