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:
$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
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
install_driver: DBD::mysql version 2.0415 loaded from /usr/lib/perl5/s
<- 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!
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- 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
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||