Skip to content

Instantly share code, notes, and snippets.

@larig
larig / dbdmysql-problem.md
Last active August 29, 2015 14:11
Problems connecting to MySQL v4.0 using DBD::mysql

Problems Connecting to MySQL via DBD::mysql

Something very strange happens when trying to connect to a MySQL v4.0 server using DBD::mysql with a v5.6 library and a .cnf configuration file. The driver doesn't just ignore a necessary configuration setting, it seems to positively reverse it, causing all perl connections to fail.

Background

We need a programmatic MySQL client (perl) to be able to connect to all of our databases, including MySQL v5.6 and MySQL v4.0. We therefore need a client of at least v5.6 with configuration allowing it to connect to lower versions. We are using

MySQL v5.6.21-70.1 for debian-linux-gnu on x86_64
 (Percona Server (GPL), Release 70.1, Revision 698)