"Bad handshake" (1043) after upgrading MySQL from 4.1.0 to 4.1.2

"Bad handshake" (1043) after upgrading MySQL from 4.1.0 to 4.1.2

am 02.06.2004 07:03:04 von Robert Sinton

I'm bound to be missing something obvious here, but after upgrading my =
MySQL server from 4.1.0 to 4.1.2, I get the above errstr/err when issuing =
a DBI->connect.

I have confirmed that I can log in and use the database satisfactorily usin=
g the mysql client; I can also swap the server back to 4.1.0 and connect =
as expected. There is nothing coming up in the MySQL error log.

Server is OS X 10.2.6, perl 5.6.0. DBI & DBD::MySQL are up to date.

Any ideas/diagnostic suggestions/magic answers much appreciated.

Cheers,
Robert

--=20
Robert Sinton Phone +64 (3) 366-5454
Senior Systems Consultant Fax +64 (3) 366-4456
MagnumMac Resources Ltd 21-23 Carlyle Street, PO Box 1144, Christchu=
rch

In science it often happens that scientists say, "You know that's a really
good argument; my position is mistaken," and then they would actually
change their minds and you never hear that old view from them again. They
really do it. It doesn't happen as often as it should, because scientists
are human and change is sometimes painful. But it happens every day. I
cannot recall the last time something like that happened in politics or
religion. -- Carl Sagan, astronomer and writer (1934-1996)


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: "Bad handshake" (1043) after upgrading MySQL from 4.1.0 to 4.1.2

am 02.06.2004 17:48:21 von Rudy Lippan

On 2 Jun 2004, Robert Sinton wrote:

> I'm bound to be missing something obvious here, but after upgrading my MySQL
> server from 4.1.0 to 4.1.2, I get the above errstr/err when issuing a
> DBI->connect.
>
> I have confirmed that I can log in and use the database satisfactorily using
> the mysql client; I can also swap the server back to 4.1.0 and connect as
> expected. There is nothing coming up in the MySQL error log.
>
> Server is OS X 10.2.6, perl 5.6.0. DBI & DBD::MySQL are up to date.
>
> Any ideas/diagnostic suggestions/magic answers much appreciated.
>

Try re-compiling DBD::mysql against the 4.1.2 libraries.

Rudy


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: "Bad handshake" (1043) after upgrading MySQL from 4.1.0 to 4.1.2

am 02.06.2004 17:48:21 von Rudy Lippan

On 2 Jun 2004, Robert Sinton wrote:

> I'm bound to be missing something obvious here, but after upgrading my MySQL
> server from 4.1.0 to 4.1.2, I get the above errstr/err when issuing a
> DBI->connect.
>
> I have confirmed that I can log in and use the database satisfactorily using
> the mysql client; I can also swap the server back to 4.1.0 and connect as
> expected. There is nothing coming up in the MySQL error log.
>
> Server is OS X 10.2.6, perl 5.6.0. DBI & DBD::MySQL are up to date.
>
> Any ideas/diagnostic suggestions/magic answers much appreciated.
>

Try re-compiling DBD::mysql against the 4.1.2 libraries.

Rudy


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: "Bad handshake" (1043) after upgrading MySQL from 4.1.0 to 4.1.2

am 03.06.2004 04:19:01 von Robert Sinton

Very good point. Trying this initially gave a compilation error:
...
cc -c -I/Library/Perl/darwin/auto/DBI -I/usr/local/mysql/include -fno-=
omit-frame-pointer -g -pipe -pipe -fno-common -no-cpp-precomp -flat_=
namespace -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -Os -DVERSION=3D\"=
2.9003\" -DXS_VERSION=3D\"2.9003\" "-I/System/Library/Perl/darwin/CORE" =
mysql.c
mysql.xs: In function `XS_DBD__mysql__GetInfo_dbd_mysql_get_info':
mysql.xs:355: `net_buffer_length' undeclared (first use in this =
function)
mysql.xs:355: (Each undeclared identifier is reported only once
mysql.xs:355: for each function it appears in.)
make: *** [mysql.o] Error 1
/usr/bin/make -- NOT OK

Looks like there have been some significant changes in the handling of net_=
buffer_length.
In MySQL 4.1.0 it occurs in the following places:
include/mysql_com.h:extern unsigned long net_buffer_length;
support-files/my-medium.cnf:set-variable =3D net_buffer_=
length=3D8K
support-files/my-small.cnf:set-variable =3D net_buffer_length=3D2K
But in MySQL 4.1.2 we have:
docs/ChangeLog: use opt_net_buffer_length instead of net_buffer_length
docs/ChangeLog: local opt_max_allowed_packet and opt_net_buffer_=
length introduced
include/mysql.h: unsigned long *p_net_buffer_length;
include/mysql.h:#define net_buffer_length (*mysql_get_parameters()->p_=
net_buffer_length)
support-files/my-medium.cnf:net_buffer_length =3D 8K
support-files/my-small.cnf:net_buffer_length =3D 2K

More specifically, from include/mysql.h:
#if !defined(MYSQL_CLIENT) && !defined(MYSQL_SERVER) && !defined(=
EMBEDDED_LIBRARY)
#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_=
packet)
#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)=

#endif

So as a quick and dirty fix, I duplicated the definition for net_buffer_=
length after
(i.e. outside) this conditional in mysql.h. This got around the =
compilation error,
and the 'make' carried through to completion.

However, it doesn't seem to have made any difference to the original =
problem. I still get the same
'Bad handshake' error message :-(

Some further testing established that this problem only occurs when a =
password is required,
i.e. if privileges are granted to a user without the need for a password,
the problem does not occur. When a password is required, the same error =
message occurs
whether a correct or incorrect password is supplied.

Cheers,
Robert

--=20
Robert Sinton Phone +64 (3) 366-5454
Senior Systems Consultant Fax +64 (3) 366-4456
MagnumMac Resources Ltd 21-23 Carlyle Street, PO Box 1144, =
Christchurch

The penalty that good men pay for not being interested in politics is to =
be
governed by men worse than themselves. -- Plato, philosopher (427-347 BCE)

On Thursday, 3 June 2004 3:48 AM, Rudy Lippan =
wrote:
>On 2 Jun 2004, Robert Sinton wrote:
>
>> I'm bound to be missing something obvious here, but after upgrading my =
MySQL
>> server from 4.1.0 to 4.1.2, I get the above errstr/err when issuing a
>> DBI->connect.
>>=20
>> I have confirmed that I can log in and use the database satisfactorily =
using
>> the mysql client; I can also swap the server back to 4.1.0 and connect =
as
>> expected. There is nothing coming up in the MySQL error log.
>>=20
>> Server is OS X 10.2.6, perl 5.6.0. DBI & DBD::MySQL are up to date.
>>=20
>> Any ideas/diagnostic suggestions/magic answers much appreciated.
>>=20
>
>Try re-compiling DBD::mysql against the 4.1.2 libraries.
>
>Rudy
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: "Bad handshake" (1043) after upgrading MySQL from 4.1.0 to 4.1.2

am 03.06.2004 04:19:01 von Robert Sinton

Very good point. Trying this initially gave a compilation error:
...
cc -c -I/Library/Perl/darwin/auto/DBI -I/usr/local/mysql/include -fno-=
omit-frame-pointer -g -pipe -pipe -fno-common -no-cpp-precomp -flat_=
namespace -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -Os -DVERSION=3D\"=
2.9003\" -DXS_VERSION=3D\"2.9003\" "-I/System/Library/Perl/darwin/CORE" =
mysql.c
mysql.xs: In function `XS_DBD__mysql__GetInfo_dbd_mysql_get_info':
mysql.xs:355: `net_buffer_length' undeclared (first use in this =
function)
mysql.xs:355: (Each undeclared identifier is reported only once
mysql.xs:355: for each function it appears in.)
make: *** [mysql.o] Error 1
/usr/bin/make -- NOT OK

Looks like there have been some significant changes in the handling of net_=
buffer_length.
In MySQL 4.1.0 it occurs in the following places:
include/mysql_com.h:extern unsigned long net_buffer_length;
support-files/my-medium.cnf:set-variable =3D net_buffer_=
length=3D8K
support-files/my-small.cnf:set-variable =3D net_buffer_length=3D2K
But in MySQL 4.1.2 we have:
docs/ChangeLog: use opt_net_buffer_length instead of net_buffer_length
docs/ChangeLog: local opt_max_allowed_packet and opt_net_buffer_=
length introduced
include/mysql.h: unsigned long *p_net_buffer_length;
include/mysql.h:#define net_buffer_length (*mysql_get_parameters()->p_=
net_buffer_length)
support-files/my-medium.cnf:net_buffer_length =3D 8K
support-files/my-small.cnf:net_buffer_length =3D 2K

More specifically, from include/mysql.h:
#if !defined(MYSQL_CLIENT) && !defined(MYSQL_SERVER) && !defined(=
EMBEDDED_LIBRARY)
#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_=
packet)
#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)=

#endif

So as a quick and dirty fix, I duplicated the definition for net_buffer_=
length after
(i.e. outside) this conditional in mysql.h. This got around the =
compilation error,
and the 'make' carried through to completion.

However, it doesn't seem to have made any difference to the original =
problem. I still get the same
'Bad handshake' error message :-(

Some further testing established that this problem only occurs when a =
password is required,
i.e. if privileges are granted to a user without the need for a password,
the problem does not occur. When a password is required, the same error =
message occurs
whether a correct or incorrect password is supplied.

Cheers,
Robert

--=20
Robert Sinton Phone +64 (3) 366-5454
Senior Systems Consultant Fax +64 (3) 366-4456
MagnumMac Resources Ltd 21-23 Carlyle Street, PO Box 1144, =
Christchurch

The penalty that good men pay for not being interested in politics is to =
be
governed by men worse than themselves. -- Plato, philosopher (427-347 BCE)

On Thursday, 3 June 2004 3:48 AM, Rudy Lippan =
wrote:
>On 2 Jun 2004, Robert Sinton wrote:
>
>> I'm bound to be missing something obvious here, but after upgrading my =
MySQL
>> server from 4.1.0 to 4.1.2, I get the above errstr/err when issuing a
>> DBI->connect.
>>=20
>> I have confirmed that I can log in and use the database satisfactorily =
using
>> the mysql client; I can also swap the server back to 4.1.0 and connect =
as
>> expected. There is nothing coming up in the MySQL error log.
>>=20
>> Server is OS X 10.2.6, perl 5.6.0. DBI & DBD::MySQL are up to date.
>>=20
>> Any ideas/diagnostic suggestions/magic answers much appreciated.
>>=20
>
>Try re-compiling DBD::mysql against the 4.1.2 libraries.
>
>Rudy
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org