Perl Module install problems

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,113
Location
California
I'm trying to install some perl modules my clients need.

I use CPAN but I'm not getting anywhere :( .

I'm trying to install DBD::mysql using CPAN on a RHL 7.3/DA install.

I get this error:

Cannot connect: Access denied for user: 'root@localhost' (Using password: NO)

Which is certainly reasonable, as I shouldn't be able to log in as root without a password.

But it appears as if the only way to install with CPAN is to do it this way.

How do I set MySQL to eliminate and/or change the root password, at least temporarily?

Thanks.

Jeff
 
Nope.

I got the answer from John and it'll eventually be part of a how-to, but in the meantime:

Code:
# kill `/var/lib/mysql/<host>.<dom.ain>.pid`
to stop mysql, then to start it without requring passwords:
Code:
# /usr/bin/mysqld_safe \
--skip-grant-tables \
--datadir=/var/lib/mysql \
--pid-file=/var/lib/mysql/<host>.<dom.ain>.pid \
&
and after doing whatever has to be done without passwords:
Code:
# /etc/rc.d/init.d/mysqld stop
# /etc/rc.d/init.d/mysqld start

Jeff
 
Another possibility is to manually edit the Makefile.PL in the /root/.cpan/bundles/MySQL-DBD (don't nail me down on this path, doing it by head ;) ) and add the MySQL root username and password to the file there.., then do a 'perl Makefile.PL', make, make install

Should work too :)
 
Jeroen,

Wouldn't that create a security issue by letting anyone log into mysql without a password?

Jeff
 
Hm, you got me there to be honest, not entirely sure, I thought it just used those values to test the validity and dependencies of the compiled package..
 
Back
Top