如何創建指向 mysql 的符號鏈接?(Mac, XAMPP) (How do I create a symbolic link to mysql? (Mac, XAMPP))


問題描述

如何創建指向 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

(by SheldonsreimerOkami)

參考文件

  1. How do I create a symbolic link to mysql? (Mac, XAMPP) (CC BY-SA 3.0/4.0)

#xampp #command-line #MySQL #macos






相關問題

使用xampp在本地向gmail帳戶發送電子郵件,沒有錯誤但電子郵件未到達 (sending email to gmail account locally with xampp, no error but the email does not arrive)

apache限制帶寬 (apache restricting bandwidth)

XAMPP 指向根文件夾外的文件 (XAMPP pointing a file outside root folder)

有沒有辦法將套接字從 perl 腳本連接到 PHP 服務器? (Is there a way to connect sockets from perl script to a PHP server?)

kết nối mysql và php (mysql and php connection)

為什麼我在 Apache 中獲得禁止訪問? (Why do I get an Access forbidden in Apache?)

Xampp 僅在通過主機名訪問時要求輸入密碼 (Xampp asking for a password only when accessed through hostname)

刪除 index.php codeigniter 3.0.6 (remove index.php codeigniter 3.0.6)

PhpUnit 無法訪問外部 url (PhpUnit unable to access external url)

使公共網站重新連接到本地 html 或 xampp (make public website reconnect to local html or xampp)

如何創建指向 mysql 的符號鏈接?(Mac, XAMPP) (How do I create a symbolic link to mysql? (Mac, XAMPP))

mysql不會在我的xamp上啟動如何解決這個問題? (mysql wont start on my xamp how to fix this?)







留言討論