title: MySQL command line '-bash command not found'
body: <p>The following link at the end of the post was helpful, but can someone clarify this? There are two answers that are in complete conflict, so I am asking about it.</p>
  <p>One person responds that you should get to the MySQL command line like this.</p>
  <p>Navigate to the directory</p>
  <pre class="lang-none prettyprint-override"><code>/usr/local/mysql/bin
  </code></pre>
  <p>And at a Unix prompt, type:</p>
  <pre class="lang-none prettyprint-override"><code>./mysql
  </code></pre>
  <p>Then type the following to reset the password.</p>
  <pre class="lang-none prettyprint-override"><code>mysql -u root -p
  </code></pre>
  <p>But then another person says:</p>
  <blockquote>
  <p>No, you should run mysql -u root -p in bash, not at the MySQL command-line. If you are in mysql, you can exit by typing exit.</p>
  </blockquote>
  <p>Neither of these work for me.</p>
  <p>First method. From the Bash prompt:</p>
  <pre class="lang-none prettyprint-override"><code>mysql -u root -p
  
  Enter password:  xxxx
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  </code></pre>
  <p>Second method from the <em>mysql&gt;</em> prompt:</p>
  <pre class="lang-none prettyprint-override"><code>mysql&gt; -u root -p
      -&gt;
  </code></pre>
  <p>I also often get this error:</p>
  <blockquote>
  <p>-bash command not found</p>
  </blockquote>
  <p>I am unable to log in to <a href="https://en.wikipedia.org/wiki/PhpMyAdmin" rel="nofollow noreferrer">phpMyAdmin</a>.</p>
  <p>My problem is that I am getting this error message when trying to log in to phpMyAdmin:</p>
  <blockquote>
  <p>Login without a password is forbidden by configuration</p>
  </blockquote>
  <p>The link that I have is referenced above. Responses from 2013:</p>
  <p><em><a href="https://stackoverflow.com/questions/8838777/error-1044-42000-access-denied-for-user-localhost-to-database-db">ERROR 1044 (42000): Access denied for user &#39;&#39;@&#39;localhost&#39; to database &#39;db&#39;</a></em></p>