我已經從here下載了mysql-5.6.17-osx10.7-x86.tar.gz
。現在我已經有了一個充滿MySQL相關文件的文件夾。麻煩的是,我不知道如何安裝MySQL。我試着執行mysql_install_db
,但結果卻是:安裝MySQL安裝
Last login: Sat May 24 10:45:08 on ttys000
host237-40-dynamic:~ michelegorini$ /Users/michelegorini/Downloads/mysql-5.6.17-osx10.7-x86/scripts/mysql_install_db ; exit;
FATAL ERROR: Could not find ./bin/my_print_defaults
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
logout
[Process completed]
那麼,我該怎麼辦?
更新: 考慮答案進去,我試過的東西,這個結果:
Last login: Sat May 24 10:45:08 on ttys000
host237-40-dynamic:Hakka_ michelegorini$ $ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
curl: (22) The requested URL returned error: 400
-bash: $: command not found
host237-40-dynamic:Hakka_ michelegorini$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" && brew install git &&
> brew update
curl: (22) The requested URL returned error: 400
-bash: brew: command not found
host237-40-dynamic:Hakka_ michelegorini$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" && brew install git && brew update && brew install mysql
curl: (22) The requested URL returned error: 400
-bash: brew: command not found
host237-40-dynamic:Hakka_ michelegorini$
現在怎麼辦?
關於「我已經使用mac for linux完成了該操作,因爲我在mac上,最終找到了這個存檔」? – user3670025
閱讀:http://blog.ijun.org/2011/02/mysqlinstalldb-fatal-error-could-not.html –
我試過'/ usr/local/bin/mysql_install_db --basedir =/usr/local'並且得到了'致命錯誤:找不到my-default.cnf 如果你從源代碼編譯,你需要運行'make install'到 將軟件複製到正確的位置以備操作。 如果您使用的是二進制版本,您必須位於解壓縮歸檔的頂層 級別,或者傳遞指向該位置的--basedir選項 .'但是,my_default.cnf文件不適用於我文件系統。 – user3670025