I'm a bit confused by your post. In the error message you provide,
DBI->connect(host=myhost;database=my_db) failed: Access denied for u +ser: 'maisey@myhost' (Using password: NO) at frontpage.cgi line 25
the host and database don't correspond to the code you posted
DBI->connect("DBI:mysql:host=localhost;database=db_name", ...
This leads me to believe that the error might be coming from somewhere else.

Suggestion: Strip this down to a small example that demonstrates the problem. You don't need to show us your table formatting code, just a snippet that exhibits this error message, but still permits a query to be executed without error. I'm betting you can do this in less than 20 lines. If you haven't spotted the problem yourself along the way, a small snippet increases the odds that someone here will spot the problem.


In reply to Re: perl/CGI/DBI + odd behaviour by dws
in thread perl/CGI/DBI + odd behaviour 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.