There are already a lot of answer to this question, especially this one https://stackoverflow.com/a/10847618/5515861. I only want to add couple of notes. If you guys using Mac, I don't know how you install the MySQL, but the first thing to investigate is where is your MySQL installation is located. For me, MySQL is installed using brew
for version 5.7
, and the location is /usr/local/opt/[email protected]/
, so add the following to my ~/.zshrc
.
MYSQL=/usr/local/opt/[email protected]/bin/
MYSQL_LIB=/usr/local/opt/[email protected]/lib/
export PATH=$PATH:$MYSQL
export DYLD_LIBRARY_PATH=$MYSQL_LIB:$DYLD_LIBRARY_PATH
Hope you fix your issues