title: Bad handshake (1043) between PHP 4.4.9 and MySQL 5.7.8
body: <p>I have an issue when trying to connect to MySQL database from an old system to a new one. I received the error code 1043. It seems related to bad handshake. No issue when doing the opposite.</p>
  
  <p>Interesting thing is if I kill the mysqld process from the new system, I have no error from mysql_connect!</p>
  
  <p>Something to remember. I can't upgrade the old system to the new PHP and MySQL. No more space and difficulty to recompile them to my platform.</p>
  
  <p><strong>Old system configuration:</strong></p>
  
  <ul>
  <li>PHP 4.4.9</li>
  <li>MySQL 4.1.18</li>
  <li>Using mysql_connect() to get access to the new system.</li>
  <li>my.cnf has the remote user name and password to connect to the new system.</li>
  </ul>
  
  <p><strong>New system configuration:</strong></p>
  
  <ul>
  <li>PHP 7.1.2</li>
  <li>MySQL 5.7.8</li>
  <li>MySQL has a remote user and password</li>
  </ul>
  
  <p>The PHP code from the old system looks like this:</p>
  
  <pre><code>$cn = mysql_connect($address, $user, $password);
  if (!$cn)
  {
      die("Could not open $table database: " . $db);
  }
  
  mysql_select_db($db, $cn);
  </code></pre>
  
  <p>After that, here what I tried:</p>
  
  <ol>
  <li>Because I thought it could be a password hashing issue, I tried the OLD_PASSWORD() (<code>set password for 'remote_user'@'%'=OLD_PASSWORD('password')</code>), but it has been removed in version 5.7.8 </li>
  <li>Same thing with the old_passwords flag. Has been removed.</li>
  <li>Set an empty password to the new system database remote user: <code>set password for 'remote_user'@'%'='';</code></li>
  <li>Set the --skip-grant-tables to the new system's mysqld process</li>
  </ol>
  
  <p>Now, I do not know what I could do anymore. Any suggestions?</p>
  
  <p>Thanks in advance.</p>