安装MySQL

时间:2014-05-24 08:53:25

标签: mysql

我已从here下载了mysql-5.6.17-osx10.7-x86.tar.gz。现在我有一个充满MySQL相关文件的文件夹。麻烦的是,我不知道如何安装MySQL。我尝试执行mysql_install_db,但结果是:

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$ 

现在怎么办?

2 个答案:

答案 0 :(得分:1)

自制程序包管理器消除了在计算机上安装软件包的痛苦。

Here's how to install mysql on a mac

命令在一行中:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" && brew install git && brew update && brew install mysql

答案 1 :(得分:1)

如果我刚刚进入一个链接,我会找到this video,这已经解决了我的问题,据我所知。为了进一步阅读,如果想要将SQL与Java接口,this video可能会有用。