title: sh: mysql: command not found PHP exec() macOS
body: <p>I installed mysql with Homebrew on my MacOSX Sierra. Now when I try to execute the PHP function </p>
  
  <pre><code>&lt;?= exec("mysql --version 2&gt;&amp;1"); ?&gt;
  </code></pre>
  
  <p>i get the error: <code>sh: mysql: command not found</code></p>
  
  <p>PS: mysql is working fine from the terminal.</p>