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
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.