3

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
  • Another way is to change your PATH variable so it includes the directory with mysql
    – Dyppl
    Commented Jun 30, 2011 at 16:10

2 Answers 2

14

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
1
  • 1
    You might need to use sudo, also wouldn't be better to use /usr/local/bin instead of /usr/bin, since the last one can be upgraded by the system.
    – Ibrahim.H
    Commented Dec 13, 2018 at 16:16
1

ln -s [actual mysql directory] [symlink directory]

i.e.: ln -s /Applications/XAMPP/xamppfiles/bin/mysql /home/user/me/mysql

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.