Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
But....all looks good on the mysql side.[root@pepe DBD-mysql-3.0002]# make test PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" " +test_harness(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 lin +e 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.
When I try and run the pure perl version (which installs OK) and runmysql select * from user where user = 'root'; +-----------+------+------------------+-------------+-------------+--- +----------+-------------+-------------+-----------+-------------+---- +-----------+--------------+-----------+------------+----------------- ++------------+------------+ | Host | User | Password | Select_priv | Insert_priv | Up +date_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv +| Process_priv | File_priv | Grant_priv | References_priv | Index_pri +v | Alter_priv | +-----------+------+------------------+-------------+-------------+--- +----------+-------------+-------------+-----------+-------------+---- +-----------+--------------+-----------+------------+----------------- ++------------+------------+ | localhost | root | 742939b941ebef1c | Y | Y | Y | Y | Y | Y | Y | Y +| Y | Y | Y | Y | Y | Y + | | pepe | root | | Y | Y | Y | Y | Y | Y | Y | Y +| Y | Y | Y | Y | Y | Y + | +-----------+------+------------------+-------------+-------------+--- +----------+-------------+-------------+-----------+-------------+---- +-----------+--------------+-----------+------------+----------------- ++------------+------------+ 2 rows in set (0.11 sec)
I get#! /usr/bin/perl -w use strict; use DBI; my @driver_names = DBI->available_drivers; print @driver_names,"\n"; my %drivers = DBI->installed_drivers; print %drivers, "\n"; my @data_sources = DBI->data_sources('mysqlPP'); print @data_sources,"\n"; my $dbh = DBI->connect('dbi::mysqlPP::test','','');
What have I forgot?DBMExamplePFileProxySpongemysqlPP dbi:mysqlPP: Can't connect to data source mysqlPP::test, no database driver specifi +ed and DBI_DSN env var not set at huh.pl line 11
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBD::msyql tests
by u235sentinel (Hermit) on Mar 09, 2006 at 01:08 UTC | |
|
Re: DBD::msyql tests
by duckyd (Hermit) on Mar 08, 2006 at 23:19 UTC |