title: Error: Access denied for user 'www-data'@'localhost'
body: <p>I'm running a mysql database (managed through phpmyadmin) on a lubuntu virtual machine, which itself is on a mac 10.6.
  Everything was working smoothly until earlier, (and I didn't touch any part of the login code!) when I got the following error on my pages:</p>
  
  <blockquote>
    <p>Erreur : SQLSTATE[28000] [1045] Access denied for user 'www-data'@'localhost' (using password: NO)</p>
  </blockquote>
  
  <p>I don't understand where this error is coming from as I don't have a user called www-data on phpmyadmin and my files are supposed to be using the root account on the database:</p>
  
  <pre><code>$dbname = 'name';
  $dbuser = 'root';
  $dbpass = '*****';
  $dbhost = 'localhost';
  try{
      $linkpdo = new PDO('mysql:host='.$dbhost.';'.$dbname.', '.$dbuser.' , '.$dbpass);
      $linkpdo -&gt; setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  }
  catch (Exception $e) {
      die('Erreur : '.$e-&gt;getMessage());
  }
  </code></pre>
  
  <p>After some googling I saw that people modified their config.conf file, but I don't know how or why.</p>