title: mysql_skip_secure_auth not skipping secure auth
body: <p><strong>Edit</strong>: From what I can tell, the root cause of this problem is that the right Perl modules are being installed, but the wrong <code>mysql.so</code> file is being loaded. </p>
  
  <pre><code>my $dsn = "DBI:mysql:"
      . "database=$db;"
      . "host=$dbhost;"
      . "mysql_ssl=$dbssl;"
      . "mysql_skip_secure_auth=1;";
  </code></pre>
  
  <p>I recently attempted to upgrade our version of DBD::mysql, but kept coming across the <code>DBI connect('database=mydb;host=myhost','myuser',...) failed: Connection using old (pre-4.1.1)</code> error. </p>
  
  <p>After many hours of debugging, and determining that the <em>correct</em> option of not updating the password hashing methods of our mysql tables was not possible with our overall system, I found that with <a href="http://search.cpan.org/~capttofu/DBD-mysql-4.027/lib/DBD/mysql.pm" rel="nofollow">DBD::Mysql 4.027</a> you could declare "mysql_skip_secure_auth" as part of your dsn.</p>
  
  <p>However, this doesn't seem to work.</p>
  
  <p>If I run<code>mysql -h $myhost -u $myuser -p --skip-secure-auth</code>, I am able to connect without incident, but trying to do this with DBI/DBD::mysql, I always run into the error above, as if the directive is being ignored.</p>
  
  <ul>
  <li><a href="http://search.cpan.org/~capttofu/DBD-mysql-4.027/lib/DBD/mysql.pm#Class_Methods" rel="nofollow">Relevant documentation</a></li>
  </ul>
  
  <p>I have also tried using <code>mysql_read_default_file</code> with the same option set, as well as simply <code>mysql_skip_secure_auth</code> in the DSN. No combination of any of these things has worked.</p>
  
  <p>Am I missing something?</p>
  
  <p>EDIT: </p>
  
  <p>Trace output (edited to remove sensitive information):</p>
  
  <pre><code>imp_dbh-&gt;mysql_dr_connect: host = |{host}|, port = 0, uid = {user}, pwd = {pwd}
  imp_dbh-&gt;mysql_dr_connect: Skipping secure auth
  imp_dbh-&gt;bind_type_guessing: 0
  imp_dbh-&gt;use_server_side_prepare: 0
  imp_dbh-&gt;mysql_dr_connect: client_flags = 2
  imp_dbh-&gt;mysql_dr_connect: &lt;-           --&gt; do_error
  Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled) error 2049 recorded: Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
  
  
  
  
  my $versions = DBI-&gt;installed_versions;
  foreach (keys %$versions) {
      print "\n$_: " . %$versions-&gt;{$_};
  }
  
  DBD::SQLite: 1.26                                                               
  DBD::ExampleP: 12.014310                                                          
  DBD::Sponge: 12.010002                                                             
  DBD::Gofer: 0.015057                                                             
  DBD::DBM: 0.06                                                                    
  DBD::mysql: 4.027                                                                  
  DBI: 1.618
  </code></pre>