title: mysqli_connect fails with dbpassword
body: <p>My system seems to have some weird problems I can't explain. I have a following code snip that I would use to connect to and read data from the database</p>
  
  <pre><code>define('DB','products');
  define('HOST','localhost');
  define('DBPASS','password');
  define('DBUSER','root');
  define('DBTABLE','product_tb');
  $conn=mysqli_connect(HOST,DBUSER,DBPASS) or die('Could not connect: ' . mysqli_error($conn));
  </code></pre>
  
  <p>But it always reports an error that I can't make a connection with mysqli_connect. I try running this code on another system and it works fine. Here are the two warning and an failed connection error. </p>
  
  <blockquote>
    <p>Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045):
    Access denied for user 'root'@'localhost' (using password: NO) in
    D:\xampp\htdocs\products.php on line 7</p>
    
    <p>Warning: mysqli_error() expects parameter 1 to be mysqli, boolean
    given in D:\xampp\htdocs\products.php on line 7 Could not connect:</p>
  </blockquote>
  
  <p>This happens when I test system doesn't require password, so I left the DBPASS as blank but once I use this on the real system, it fails with the exact same error, no matter whether I left out the DBPASS or not.... I thought it was cache but I restarted mysql and apache but nothing works then. Thank you if you could offer some help.</p>