title: Getting access denied for user in WAMP
body: <p>I tried connecting to my database in WAMP, it first gave me <code>SQLSTATE[HY000] [1045] Access denied for user 'C:/wamp/www'@'localhost' (using password: NO).</code>I later changed the password but still getting <code>SQLSTATE[HY000] [1045] Access denied for user 'C:/wamp/www'@'localhost' (using password: YES)</code>.</p>
  
  <p>In phpmyadmin, I added my password to it but nothing change. here is the code for config.inc:</p>
  
  <pre><code>&lt;?php
  
  /* Servers configuration */
  $i = 0;
  
  $cfg['blowfish_secret'] = 'h]C+{nqW$omNoTIkCwC$%z-LTcy%p6_j$|$Wv[mwngi~|e'; //What you want
  
  /* Server: localhost [1] */
  $i++;
  $cfg['Servers'][$i]['verbose'] = 'Local Databases';
  $cfg['Servers'][$i]['host'] = 'localhost';//127.0.0.1
  $cfg['Servers'][$i]['extension'] = 'mysqli';
  $cfg['Servers'][$i]['auth_type'] = 'cookie';
  $cfg['Servers'][$i]['user'] = 'root';
  $cfg['Servers'][$i]['password'] = 'father2242';
  
  // Hidden databases in PhpMyAdmin left panel
  //$cfg['Servers'][$i]['hide_db'] = '(information_schema|mysql|performance_schema|sys)';
  
  // Allow connection without password
  $cfg['Servers'][$i]['AllowNoPassword'] = true;
  
  // Suppress Warning about pmadb tables
  $cfg['PmaNoRelation_DisableWarning'] = true;
  
  // To have PRIMARY &amp; INDEX in table structure export
  //$cfg['Export']['sql_drop_table'] = true;
  //$cfg['Export']['sql_if_not_exists'] = true;
  
  $cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman/5.7/en/';
  /* End of servers configuration */
  
  ?&gt;
  </code></pre>
  
  <p>For my database connection parameters (db.ini):</p>
  
  <pre><code>;MySQLi hostname
  host = localhost
  
  ;MySQLi Username
  user = root
  
  ;MySQLi Password
  pass = father2242
  
  ;MySQLi Table - Database
  name = ddrive
  </code></pre>
  
  <p>Script for accessing the connection(database.php)</p>
  
  <pre><code>&lt;?php
  
      function DB() {
  
          $dbconfig = (object) parse_ini_file(__DIR__.'/../ini/db.ini');
  
          try {
  
              $db = new PDO(
                  "mysql:host={$dbconfig-&gt;host};dbname={$dbconfig-&gt;name}",
                  $dbconfig-&gt;user,
                  $dbconfig-&gt;pass
              );
  
              $db-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  
              return $db;
  
          } catch (PDOException $e) {
  
              die($e-&gt;getMessage());
  
          }
  
      }
  ?&gt;
  </code></pre>
  
  <p>Why am I getting this error? I am open to suggestions or criticisms. </p>