We have a number of Perl scripts which connect to a MySQL server from a Solaris 5.9 box

We are now upgrading to a new SunOS 5.10 server, but attempting the run the same scripts to connect to the same MySQL server no longer works.

The user I'm using to connect to the database does not have a password. However, when I try to connect using this user from the new Solaris box with the same scripts, I get the following error:

DBI connect('database=production;host=SERVER;port=PORT','USER',...) failed: #28000Access denied for user 'USER'@'SERVERNAME.DOMAIN.com' (using password: YES) at /usr/local/lib/perl5/site_perl/5.8.7/DBD/mysqlPP.pm line 109

I find the '(using password: YES)' message somewhat troubling as I'm passing a blank password. Strangely, if I assign a password to this user, I can connect to it without error (assuming I update the script to connect using the new password, of course.)

I'm using Perl v5.8.7 built for sun4-solaris and DBI 1.54, which are both slighter newer than what is on the older box. In the hopes that this was a flaw in the newer DBI, I downgraded the module to the version we were using, but this gives the same results. I'm using DBD-mysqlPP v0.04 to connect to the database.

I went code diving to see if I could find a flaw in the way the module handles blank passwords, but I didn't see anything obvious.

At this point I remain uncertain if I have a Perl or a MySQL problem. And ideas?


In reply to DBI Access Denied with blank password by Grey_Magus

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.