問題描述
如何創建指向 mysql 的符號鏈接?(Mac, XAMPP) (How do I create a symbolic link to mysql? (Mac, XAMPP))
I have just installed XAMPP and I went to the command line and typed 'mysql' and I got the following error:
"command not found"
When I specify where mysql is located "/Applications/XAMPP/xamppfiles/bin/mysql -u root"
it works fine so I'm just wondering how I could create a link so that I don't have to type the full path name each time?
Thanks
參考解法
方法 1:
You'll want to put it in /usr/bin if you want to be able to type just mysql
ln -s /Applications/XAMPP/xamppfiles/bin/mysql /usr/bin/mysql
方法 2:
ln -s [actual mysql directory] [symlink directory]
i.e.: ln -s /Applications/XAMPP/xamppfiles/bin/mysql /home/user/me/mysql