title: PDO on Windows ignores host name and username when password is empty
body: <p>I'm not sure if there's something wrong with my setups or this is a bug in PDO on Windows:</p>
  
  <pre><code>&lt;?php 
  
  $dsn = 'mysql:host=127.0.0.1;dbname=mydb;charset=UTF8';
  $username = 'myuser';
  $password = '';
  $pdo = new PDO($dsn, $username, $password);
  </code></pre>
  
  <p>Errors out for me with:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'PDOException' with message
    'SQLSTATE[42000] [1044] Access denied for user ''@'localhost' to
    database 'mydb'' in C:\Ampps\www\test.php:6 Stack trace: #0
    C:\Ampps\www\test.php(6): PDO->__construct('mysql:host=127....',
    'myuser', '') #1 {main} thrown in C:\Ampps\www\test.php on line 6</p>
  </blockquote>
  
  <p>I've been able to reproduce this on all 3 of my Windows dev machines, but on none of the linux servers.</p>
  
  <p>Can anyone confirm, or point out what could be a problem?</p>
  
  <p>Thank you!</p>
  
  <p>EDIT: The privileges are set correctly on the user with empty password.</p>
  
  <p>EDIT2: There was a report that the issue is reproducible on Mac running MAMP 3.0.3</p>
  
  <p>EDIT3: There were couple of reports before, but it looks like it hasn't been fixed yet:</p>
  
  <p><a href="https://bugs.php.net/bug.php?id=43493" rel="nofollow">https://bugs.php.net/bug.php?id=43493</a></p>
  
  <p><a href="https://bugs.php.net/bug.php?id=46457" rel="nofollow">https://bugs.php.net/bug.php?id=46457</a></p>
  
  <p>My report: <a href="https://bugs.php.net/bug.php?id=67026" rel="nofollow">https://bugs.php.net/bug.php?id=67026</a></p>
  
  <p>EDIT4: It works when the permissions are given to 'myuser'@'localhost', but the problem appears when permissions are given to 'myuser'@'%' without password - on linux as well</p>