should I force a install for DBD::mysql if tests fail?

R

Rahul

I tried to install from CPAN "DBD::mysql" and it failed saying:

Running make install
make test had returned bad status, won't install without force

I can see that the tests are failing like so:

all skipped: ERROR: Access denied for user 'root'@'localhost' (using
password: NO). Can't continue test
t/40keyinfo.................skipped

etc.


It seems that mysql is not allowing it to connect passwordless as root.
This seems desirable to me! Should I just force the install somehow or is
there a cleaner fix?
 
R

Rahul

Do you need the latest version for a specific reason? If not, and you
are on a linux platform, your distro probably already provides DBD::mysql
in one of its packages.

Thanks Keith! I was installing Bugzilla and its pre-installation check-
script "checksetup.pl" complained:

* In order to access your database, Bugzilla requires that the *
* correct "DBD" module be installed for the database that you are *
* running.
MySQL: /usr/bin/perl install-module.pl DBD::mysql
Minimum version required: 4.00

I am on RHEL. I tried "yum info perl-DBD-mysql" and it says:

[snip]
Version : 3.0007
Release : 2.el5
Size : 326 k
Repo : installed
[snip]

So I assume the native version won't do! Is there any other way out? What
would you recommend in this case?
 
R

Rahul

There are many versions of RHEL; I'm guessing you're on 5, but if not
you should specify.

Right, my bad! Didn't realize it could be relevant.

Red Hat Enterprise Linux Server release 5.3 (Tikanga)
 
R

Rahul

You have at least three options, of which I slightly prefer the first.

Thanks Keith. I got it installed now. Motivated by comments it did it using
a slightly modified "Option 4"

mysql>grant all privileges on test.* to 'root'@'localhost' identified by ''

perl -MCPAN -e 'install DBD::mysql'

mysql> ####commands to revoke passwordless loging####
 
R

Rahul

How else would you configure testing in an arbitrary MySQL environment?
Any default username/password/dbname combination is sure not to work in
many environments, not to mention dbhost. So, either you're stuck with
not doing any of the live db tests, or you need a way to configure them.
Or you ignore the results of the live tests if in CPAN, or tell users to
force install DBD::mysql. But neither of those seem best practice.

Maybe tell users to add a specific user/pw to mysql with very limited
permissions on a test db. Thats what I ended up doing. There were some
instructions but I missed them in the lots of scrolling output. Maybe if
CPAN stopped there for a user input.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top