I've recently upgraded mysql and perl, but I can't get DBD::mysql to work (I've loaded DBD::mysqlPP in the mean time) during the tests I get...
[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.
But....all looks good on the mysql side.
mysql 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)
When I try and run the pure perl version (which installs OK) and run
#! /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','','');
I get
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
What have I forgot?

In reply to DBD::msyql tests by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.