Brew now also has package mysql-client, so you don’t need to install the full mysql package just in order to get tools like mysqldump; It’s sufficient to run brew install mysql-client.
You should pay attention on the post-installation notice:
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"' >> ~/.bash_profile
Otherwise, you would need to use binary directly located at /usr/local/opt/mysql-client/bin/mysqldump.