title: MySQL remote connection fails with "unknown authentication method"
body: <p>I am trying to remotely connect to MySQL server online from my local machine, but I am getting the following error:</p>
  
  <pre><code>Warning: PDO::__construct(): The server requested authentication 
  method unknown to the client [mysql_old_password] in 
  C:\xampp\htdocs\ticket\terminal\sync.php
  
  SQLSTATE[HY000] [2054] The server requested authentication method 
  umknown to the client
  </code></pre>
  
  <p>My local MySQL server version is 5.5.27, libmysql - mysqlnd 5.0.10
  The remote MySQL server version is 5.5.23, the mysqlnd version isn't exposed.</p>
  
  <p>I guess it's an incompatible password hash issue, but I do not know how to resolve it.
  Below is part of my connection code</p>
  
  <pre><code>$dsn = 'mysql:host=184.173.209.193;dbname=my_db_name';
  $options = array(PDO::MYSQL_ATTR_INIT_COMMAND =&gt; 'SET NAMES utf8',
  ); 
  
  try {
      $online_dbh = new PDO($dsn, 'myusername', 'mypassword', $options);
      $dbh-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
      echo "Congratulations!";
  } catch (PDOException $e) {
      echo $e-&gt;getMessage();
  } 
  </code></pre>