title: How to link mysql-client installed from Homebrew with diesel-cli?
body: <p>I have been trying to install the Rust Diesel CLI tool using <code>cargo install diesel_cli</code>, but the installation fails with a linking error </p>
  
  <pre class="lang-none prettyprint-override"><code>ld: library not found for -lmysqlclient
   clang: error: linker command failed with exit code 1 
  (use -v to see invocation)
  </code></pre>
  
  <p>I installed the MySQL client using Homebrew: <code>brew install mysql-client</code>. During installation I got the following warning:</p>
  
  <pre class="lang-none prettyprint-override"><code>mysql-client is keg-only, which means it was not symlinked into /usr/local,
  because conflicts with mysql.
  If you need to have mysql-client first in your PATH run:
    echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' &gt;&gt; ~/.bash_profile
  For compilers to find mysql-client you may need to set:
    export LDFLAGS="-L/usr/local/opt/mysql-client/lib"
    export CPPFLAGS="-I/usr/local/opt/mysql-client/include”
  </code></pre>
  
  <p>I set the <code>PATH</code> and flags as in that warning message, but I still get the above linking error when trying to install the diesel-cli tool. I am  unfamiliar with how to do linking in Rust - are there extra steps I need to do here to link mysqlclient directly? </p>