Reputation: 107
It is complicate situation
this is my ~/.zprofile
# Added by Toolbox App
export PATH="$PATH:/Users/{username}/Library/Application Support/JetBrains/Toolbox/scripts"
export MVN=${HOME}/Library/apache-maven-3.8.6
export PATH=$PATH:${MVN}/bin
export PATH="$PATH:/Users/{username}/Library/Python/3.9/lib/python/site-packages"
export PATH="$PATH:/Users/{username}/Library/Python/3.9/bin"
export PATH="$PATH:/usr/local/sbin"
export PATH="$PATH/usr/local/Homebrew/bin"
export PATH=“$PATH/usr/local/opt/[email protected]/bin”
With both mysql and brew line -> can't use both brew and mysql
If I remove mysql line -> can use brew but not mysql
If I remove both mysql and brew line -> can use brew but not mysql
ls /usr/local/opt with grep 'mysql' then
$> ls -al /usr/local/opt | grep mysql
lrwxr-xr-x 1 {username} admin 24 10 12 11:05 mysql -> ../Cellar/mysql/8.0.30_1
lrwxr-xr-x 1 {username} admin 26 10 15 15:01 [email protected] -> ../Cellar/[email protected]/5.7.39
lrwxr-xr-x 1 {username} admin 24 10 12 11:05 [email protected] -> ../Cellar/mysql/8.0.30_1
And I also checked mysql command is not found after installing using homebrew.
but I cant figure out the cause
please help
Upvotes: 0
Views: 2334
Reputation: 211540
When adding elements to path, do not forget to put in the :
separator. What you've done is just smashed this on the end, effectively fusing it to whatever unfortunate entry was last in the list.
Instead:
export PATH="$PATH:/usr/local/opt/[email protected]/bin"
Also there's "smart quotes" in your code, which could be an issue. Those are not interpreted as quotes, but as part of the path.
When editing files like this, be sure to use a code editor and not a word processor. Word processors will substitute the quotes to make things look nice, but this will confuse the shell.
Upvotes: 2
Reputation: 794
The problem is that the mysql path is incorrect. The correct path should be:
export PATH="$PATH:/usr/local/opt/[email protected]/bin"
Upvotes: 1