Skip Menu |

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 120091
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: xiangyu.hu [...] outlook.com
Cc: pali [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: DBD-MySQL does not support MySQL Authentication Switch method.
Date: Sat, 4 Feb 2017 07:26:21 +0000
To: " bug-DBD-mysql [...] rt.cpan.org" <bug-DBD-mysql [...] rt.cpan.org>
From: xiangyu hu <xiangyu.hu [...] outlook.com>
Hey Team, Greetings. I am using DBD-MySQL and we are relying a MySQL protocol spec of Authentication Switch (https://dev.mysql.com/doc/internals/en/determining-authentication-method.html) . It appears DBD-MySQL does not fully support that. Please verify and take a look. Thanks, Xiangyu Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
On Sob Feb 04 02:26:39 2017, xiangyu.hu@outlook.com wrote: Show quoted text
> Hey Team, > > Greetings. I am using DBD-MySQL and we are relying a MySQL protocol > spec of Authentication Switch > (https://dev.mysql.com/doc/internals/en/determining-authentication- > method.html) . It appears DBD-MySQL does not fully support that. > Please verify and take a look. > > Thanks, > Xiangyu > > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows 10 >
Hi! What are you using for connecting to your server? Just standard mysql client binary with --default-auth= and --plugin-dir= options? https://dev.mysql.com/doc/refman/5.7/en/mysql-command-options.html#option_mysql_default-auth https://dev.mysql.com/doc/refman/5.7/en/mysql-command-options.html#option_mysql_plugin-dir Or do you have those settings already in your my.cnf? DBD::mysql does not support specifing MYSQL_DEFAULT_AUTH or MYSQL_PLUGIN_DIR to libmysqlclient yet. https://dev.mysql.com/doc/refman/5.7/en/mysql-options.html But you can use DBD::mysql mysql_read_default_file and mysql_read_default_group options to specify your own my.cnf file https://metacpan.org/pod/DBD::mysql#mysql_read_default_file Note that unline mysql client executable, DBD::mysql does not read any default my.cnf. So you need to specify it for DBI.
Subject: RE: [rt.cpan.org #120091] DBD-MySQL does not support MySQL Authentication Switch method.
Date: Mon, 6 Mar 2017 04:22:52 +0000
To: Pali via RT <bug-DBD-mysql [...] rt.cpan.org>
From: xiangyu hu <xiangyu.hu [...] outlook.com>
Hi Pali, Thank you for your reply. I am actually talking about “Authentication Method switch packet” that is part of MySQL handshake protocol and yet not recognized by DBD::MySQL. The process is described in the uri I said before – When including authentication reply in the Handshake Response Packet<https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse>, client is not obliged to use the same authentication method that was indicated by server in the Initial Handshake Packet<https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::Handshake>. The name of the authentication method used by client is stored in the packet. If the guessed authentication method used either by the client or the server in the initial handshake was not correct, server informs client which authentication method should be used using Authentication Method Switch Request Packet<https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::AuthSwitchRequest> (see Section 14.2.3, “Authentication Method Mismatch”<https://dev.mysql.com/doc/internals/en/authentication-method-mismatch.html>). Thank you Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 From: Pali via RT<mailto:bug-DBD-mysql@rt.cpan.org> Sent: Sunday, March 5, 2017 3:49 AM To: xiangyu.hu@outlook.com<mailto:xiangyu.hu@outlook.com> Cc: pali@cpan.org<mailto:pali@cpan.org> Subject: [rt.cpan.org #120091] DBD-MySQL does not support MySQL Authentication Switch method. <URL: https://rt.cpan.org/Ticket/Display.html?id=120091 > On Sob Feb 04 02:26:39 2017, xiangyu.hu@outlook.com wrote: Show quoted text
> Hey Team, > > Greetings. I am using DBD-MySQL and we are relying a MySQL protocol > spec of Authentication Switch > (https://dev.mysql.com/doc/internals/en/determining-authentication- > method.html) . It appears DBD-MySQL does not fully support that. > Please verify and take a look. > > Thanks, > Xiangyu > > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows 10 >
Hi! What are you using for connecting to your server? Just standard mysql client binary with --default-auth= and --plugin-dir= options? https://dev.mysql.com/doc/refman/5.7/en/mysql-command-options.html#option_mysql_default-auth https://dev.mysql.com/doc/refman/5.7/en/mysql-command-options.html#option_mysql_plugin-dir Or do you have those settings already in your my.cnf? DBD::mysql does not support specifing MYSQL_DEFAULT_AUTH or MYSQL_PLUGIN_DIR to libmysqlclient yet. https://dev.mysql.com/doc/refman/5.7/en/mysql-options.html But you can use DBD::mysql mysql_read_default_file and mysql_read_default_group options to specify your own my.cnf file https://metacpan.org/pod/DBD::mysql#mysql_read_default_file Note that unline mysql client executable, DBD::mysql does not read any default my.cnf. So you need to specify it for DBI.
On Sun Mar 05 23:23:07 2017, xiangyu.hu@outlook.com wrote: Show quoted text
> I am actually talking about “Authentication Method switch packet” that > is part of MySQL handshake protocol and yet not recognized by > DBD::MySQL. The process is described in the uri I said before –
DBD::mysql does not process any MySQL protocol packets nor MySQL handshake. All is done by underlying MySQL or MariaDB client library libmysqlclient.so And IIRC "Authentication Method switch packet" is already handled by libmysqlclient.so and plugin for that method automatically loaded from --plugin-dir= options. So are you able to connect to your MySQL server via mysql executable? If yes, then you should be able also via DBD::mysql by options which I described in previous email.