This is listed in my .bash_profile
PATH="/usr/local/mysql/bin:/Applications/MAMP/Library/bin:$PATH"
export PATH
After applying those changes with ". .bash_profile", "which mysql" only outputs
/usr/local/mysql/bin
How do i get mysql to also look at /Applications/MAMP/... ?
Thanks in advance.
What is happening here is that mysql/bin is listed before the MAMP bin folder. The path is being evaluated from left to right, meaning that because which
found mysql
in the mysql/bin
folder it is returning that one, without ever processing the other directories.
If you want the mysql binary to be found from the MAMP binary folder, then switch the order of your PATH to PATH="/Applications/MAMP/Library/bin:/usr/local/mysql/bin:$PATH"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.