Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://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/mysql.pm <- install_driver= DBI::dr=HASH(0x817205c) <- DESTROY= undef at mysql.pm line 133 !! ERROR: 1251 'Client does not support authentication protocol reques +ted by server; consider upgrading MySQL client' <- connect= undef at DBI.pm line 426 <- errstr= 'Client does not support authentication protocol requested +by server; consider upgrading MySQL client' at DBI.pm 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 ./doc_index.pl line 23 <- disconnect_all= '' at DBI.pm 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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (1)
As of 2024-04-25 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found