Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Most wise monks:

I've got a bit of a dilemma on a server which I do not administer, and the actual administrator is very hesitant to upgrade perl and DBI to accomodate my needs. Here's the issue...

I requested an upgrade of MySQL, which he did: MySQL 4.1.9. However, he left the remaining MySQL server installed and running, for safety purposes while considering moving the entire server from the old to the new. He configured the new compile such that the binary is named "mysql4" instead of "mysql", it runs on port 3310 (instead of 3306), and socket file is /var/mysql4.1.9/mysql.sock.

Here's more version information:
Perl v5.6.0
$DBI::VERSION = "1.20"; $VERSION = '2.0415'; # DBD::mysql

I'm trying to get a perl script using DBI to connect to this OTHER server on port 3310 (not the mysql 3.x on 3306). Simply specifying "port=3310" in the $dsn doesn't seem to do anything -- it connects to the "old" mysql server. Only when specifying $ENV{'MYSQL_UNIX_PORT'} ='/var/mysql4.1.9/mysql.sock';
does the script attempt to connect to the "new" mysql installation, but at which point I get the following with DBI->trace(1):

DBI 1.20-nothread dispatch trace level set to 1 -> DBI->connect(DBI:mysql:database=dbname;host=localhost;port=3310, db +username, ****, HASH(0x80f8930)) -> DBI->install_driver(mysql) for linux perl=5.006 pid=18363 ruid=1005 + euid=1005 install_driver: DBD::mysql version 2.0415 loaded from /usr/lib/perl5/s +ite_perl/5.6.0/i386-linux/DBD/ <- install_driver= DBI::dr=HASH(0x817205c) <- DESTROY= undef at line 133 !! ERROR: 1251 'Client does not support authentication protocol reques +ted by server; consider upgrading MySQL client' <- connect= undef at line 426 <- errstr= 'Client does not support authentication protocol requested +by server; consider upgrading MySQL client' at line 427 DBI->connect(database=dbname;host=localhost;port=3310) failed: Client +does not support authentication protocol requested by server; conside +r upgrading MySQL client at ./ line 23 <- disconnect_all= '' at line 468 <- DESTROY= undef during global destruction

Is there any way to get this script with these versions of DBI, DBD::mysql to play nice with this new version of MySQL? My guess is that DBD::mysql is some sort of direct interface with the "mysql" binary, but I need it to use the binary named "mysql4". Can I hack things so it works properly?

All monks input is welcome and appreciated!

In reply to DBI with 2nd mysql server, nonstandard port by Kozz

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others scrutinizing the Monastery: (2)
    As of 2018-04-26 00:26 GMT
    Find Nodes?
      Voting Booth?