How to have "mysql" command on Mac OS?
<p>I was given a code repo which requires <code>mysql</code> in command line.</p>

<p>I am using Mac OS 10.11</p>

<p>First, I installed <code>MySQL Community Server</code> from <a href="http://dev.mysql.com/downloads/mysql/" rel="noreferrer">http://dev.mysql.com/downloads/mysql/</a> and install it by running the <code>PKG</code> file.</p>

<p>After that, I opened System Preferences to start MySQL Server.</p>

<p>Then, I tried to execute</p>

<p><code>/usr/local/mysql/bin/mysql -uroot
</code></p>

<p>and there is an error:</p>

<p><code>ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)</code></p>

<p>How could I have <code>mysql</code> in command line?</p>

<p>Thanks,</p>