"I tried, but I got the following error message: ..."

"I tried" doesn't tell us what you tried, so we're somewhat in the dark there; however, perhaps jumping directly to the error message will prove useful. What did you see when you looked at line 1395 of C:/xampp/perl/site/lib/DBIx/Class/Storage/DBI.pm? [Correct me if I'm wrong: you didn't look, did you?] In my copy of that code, I see:

$dbh = DBI->connect(@info);

Look familiar? Now look at the line just before that (i.e. 1394):

require DBI;

So, the connection is being made using DBI's connect() method.

One key phrase that stands out:

The $data_source value must begin with "dbi:driver_name:".

Note that's dbi (in lowercase) and single colons are used!

The next paragraph goes on to explain what happens if

the driver_name part is empty (i.e., the $data_source prefix is "dbi::")

I recommend you read more than just those snippets I've pointed to; however, that may be enough for you to resolve your problems.

"I wasted an entire day on this."

Or, alternatively, you could take the silver lining view:

"I spent an entire day that I'll never forget. I learnt valuable lessons about troubleshooting and reading documentation that I'll never forget either."

-- Ken


In reply to Re^3: How to use DBIx::Class::Schema::Loader to create schema from an existing MySQL database? by kcott
in thread How to use DBIx::Class::Schema::Loader to create schema from an existing MySQL database? by david123

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.