macos mysql5.58 在 mac os 10.6.5 中重启服务器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4486543/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
mysql5.58 unstart server in mac os 10.6.5
提问by EdwardLau
MySQL 5.5.8 uninstall MAC OS 10.6.5,restart computer is message “/Library/StartupItems/MySQLCOM” has not been started because it does not have the proper security settings. i set sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /usr/local/mysql/support-files/mysql.server
MySQL 5.5.8 卸载 MAC OS 10.6.5,重新启动计算机是消息“/Library/StartupItems/MySQLCOM”尚未启动,因为它没有正确的安全设置。我设置 sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /usr/local/mysql/support-files/mysql.server
Locate the configuration defining the basedir and set the following : basedir=/usr/local/mysql datadir=/usr/local/mysql/data
找到定义 basedir 的配置并设置以下内容: basedir=/usr/local/mysql datadir=/usr/local/mysql/data
bug i click the mysql preference start mysql server isn't start
错误我单击 mysql 首选项启动 mysql 服务器未启动
and i sudo chown -R root:wheel /Library/StartupItems/MySQLCOM and restart again ,not warning message but mysql server not start ,why?
我 sudo chown -R root:wheel /Library/StartupItems/MySQLCOM 并再次重新启动,不是警告消息但 mysql 服务器未启动,为什么?
回答by Janvb
I just installed MySQL 5.5.8 (mysql-5.5.8-osx10.6-x86_64.dmg) on Mac os X 10.6.5 and also had the problem that MySQL was not starting.
我刚刚在 Mac os X 10.6.5 上安装了 MySQL 5.5.8 (mysql-5.5.8-osx10.6-x86_64.dmg),也遇到了 MySQL 无法启动的问题。
After reading this post: http://forums.mysql.com/read.php?11,399397,399606#msg-399606
看完这篇文章后:http: //forums.mysql.com/read.php?11,399397,399606#msg-399606
Modify the mysql.server script file using the following command :
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /usr/local/mysql/support-files/mysql.server
Locate the configuration defining the basedir and set the following:
basedir=/usr/local/mysql datadir=/usr/local/mysql/data
Save the file and start the mysql server in the system preferences / terminal
使用以下命令修改 mysql.server 脚本文件:
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /usr/local/mysql/support-files/mysql.server
找到定义 basedir 的配置并设置以下内容:
basedir=/usr/local/mysql datadir=/usr/local/mysql/data
保存文件并在系统首选项/终端中启动mysql服务器
This solved the problem.
这解决了问题。
Hope this helps. Thanks to http://forums.mysql.com/profile.php?11,3773555!
回答by Rubin
cheers! above answer worked for me. now i can start and stop my mysql from system preferences. The great thing about this solution is that it fixed my problem with mysql i had before the problem on my mac os x 10.6.5 was: even after unsuccessful attempt to start mysql by its preference pane i was starting mysql in terminal by "sudo /Library/StartupItems/MySQLCOM/MySQLCOM start" command; after trying to connect to my server by /usr/local/mysql/bin/mysql command in terminal i was getting "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'" error. i know it's unrelated but for reference my computer is 64bit mac with mac os x 10.6.5, installed mysql-5.5.8-osx10.6-x86_64.dmg on it.
干杯!以上答案对我有用。现在我可以从系统首选项启动和停止我的 mysql。这个解决方案的伟大之处在于它解决了我在 mac os x 10.6.5 上遇到的问题之前的 mysql 问题:即使在尝试通过其首选项窗格启动 mysql 失败后,我还是通过“sudo / Library/StartupItems/MySQLCOM/MySQLCOM start”命令;尝试通过终端中的 /usr/local/mysql/bin/mysql 命令连接到我的服务器后,我收到“错误 2002 (HY000):无法通过套接字 '/tmp/mysql.sock' 连接到本地 MySQL 服务器”错误。我知道它不相关,但作为参考,我的计算机是 64 位 mac,带有 mac os x 10.6.5,在其上安装了 mysql-5.5.8-osx10.6-x86_64.dmg。
回答by tocororo-macho
You guys are the best. It worked for me (controlling mysql from the system preferences.
你们是最棒的。它对我有用(从系统首选项控制 mysql。
Unfortunately, I also had to include the user in the wheel group:
不幸的是,我还必须将用户包含在轮组中:
sudo dseditgroup -o edit -a "user-id" -t "user-id" wheel
"user-id"@"machine-id": Sun Jan 30 14:22:45 /Library/StartupItems
$ tree -Dpugas
.
`-- [drwxr-xr-x root wheel 136 Dec 3 13:58] MySQLCOM
|-- [-rwxr-xr-x root wheel 1300 Dec 3 13:58] MySQLCOM
`-- [-rw-r--r-- root wheel 469 Dec 3 13:58] StartupParameters.plist
1 directory, 2 files