title: ERROR 1044 (42000) : Access denied for user ' '@localhost to database
body: <p>Having trouble logging in and accessing my database. Currently using Windows 10 EasyPHP 13.1</p>
  
  <p>I tried logging into my database. Using</p>
  
  <pre><code>          "C:\Program Files (x86)\EasyPHP 13.1\binaries\mysql\bin\mysql.exe" -u  jim -p;
  </code></pre>
  
  <p>An error message appeared saying 
       WARNING: Using a password on the command line interface can be insecure
        ERROR 1045 (28000): Access Denied for user 'jim'@'localhost' (using password: YES).
   Then I tried </p>
  
  <pre><code>            "C:\Program Files (x86)\EasyPHP 13.1\binaries\mysql\bin\mysql.exe" -u  jim;
  </code></pre>
  
  <p>This logged me in. However, I still cannot access the database. 
  Whenever I type the following command.</p>
  
  <pre><code> USE publications;
  </code></pre>
  
  <p>I get the error</p>
  
  <pre><code>ERROR 1044 (42000) : Access denied for user  ' '@localhost to database 'publications'
  </code></pre>
  
  <p>I have even tried the following</p>
  
  <pre><code>  GRANT ALL ON publications.* TO 'jim' IDENTIFIED BY 'mypasswd';
  </code></pre>
  
  <p>and </p>
  
  <pre><code>  GRANT ALL ON publications.* TO 'jim'@'localhost' IDENTIFIED BY 'mypasswd';
  </code></pre>
  
  <p>and </p>
  
  <pre><code>     GRANT ALL PRIVILEGES ON *.* TO 'jim'@'localhost' WITH GRANT OPTION;
  </code></pre>
  
  <p>as recommended at <a href="https://stackoverflow.com/questions/30250758/mysql-use-mysql-but-error-1044-42000-access-denied-for-user-local">mysql&gt; use mysql; but ... ERROR 1044 (42000): Access denied for user &#39;&#39; @ &#39;localhost&#39; to database &#39;mysql&#39;</a></p>
  
  <p>Even Logging in as a -u root won't let me access the database. I'm at a loss as to what the problem might be. Any ideas?</p>