I installed DWIMPerl on my Windows 64bit machine, and it seems that it came pre-installed with DBI and DBD::mysql. Then I went on to install MySQL Server 5.5. Then using a Perl script, I tried to list all the drivers and data sources. But it doesn't show the mysql databases:

#!/usr/bin/perl use warnings; use strict; use DBI; print "Available DBI Drivers and Data Sources:\n\n"; my @drivers = DBI->available_drivers('quiet'); my @sources; foreach my $driver (@drivers) { print "$driver\n"; @sources = eval { DBI->data_sources($driver) }; if($@) { print "\tError: ",substr($@,0,60),"\n"; } elsif (@sources) { foreach(@sources) { print "\t$_\n"; } } else { print "\tNo known data sources\n"; } }

The script generated this output:

Available DBI Drivers and Data Sources: ADO No known data sources DBM DBI:DBM:f_dir=. ExampleP dbi:ExampleP:dir=. File DBI:File:f_dir=. Gofer No known data sources ODBC dbi:ODBC:dBASE Files dbi:ODBC:Excel Files dbi:ODBC:MS Access Database Pg No known data sources Proxy Error: install_driver(Proxy) failed: Can't locate RPC/PlClient +.pm i SQLite No known data sources Sponge No known data sources mysql No known data sources Press any key to continue . . .

And the  mysql> show databases; on the same machine shows this:

mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ 4 rows in set (0.00 sec)

In reply to DBD mysql can't detect mysql installation by nitin1704

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.