At my terminal, I can't cd
to the folder containing mysql
and call it.
TimsMacBookAir:/ tim$ cd /Applications/MAMP/Library/bin/
TimsMacBookAir:bin tim$ mysql
-bash: mysql: command not found
If I execute the file by using the whole path, it works
TimsMacBookAir:bin tim$ /Applications/MAMP/Library/bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.5.38 Source distribution
Why is that?
cd
to the directory where the executable file resides and call it like this-./mysql
./mysql
or add.
to youPATH
which is not usually recommended.