无法在 Mac OSX 10.6 上停止 Mysql 5.1
我试图在 MacOSX 10.6 上停止 Mysql v5.1,以便升级到 Mysql v5.5。
我相信我几个月前从源代码安装了 v5.1。我已经尝试了此处列出的所有方法: 如何停止Mac OS 上安装 MySQL?。
然而,当我执行“mysqladmin shutdown”时,操作系统似乎只是生成了另一个 mysql 进程:
$ sudo mysqladmin shutdown
$ ps -Af | grep mysql
74 53283 1 0 0:00.01 ?? 0:00.01 /bin/sh /usr/local/mysql/bin/mysqld_safe
74 53324 53283 0 0:00.01 ?? 0:00.03 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --log-error=/usr/local/mysql/var/Al.local.err --pid-file=/usr/local/mysql/var/Al.local.pid
501 53343 52577 0 0:00.00 ttys003 0:00.00 grep mysql
如果我尝试终止该进程,也会发生同样的事情。 (但是,如果我尝试终止 mysqld_safe 进程,我会得到“没有这样的进程”)
我查看了 /Library/StartupItems 并且没有 MySQL 目录。我知道我没有使用MacPorts来安装Mysql。
我在这里缺少什么?我该如何杀死这头野兽?
I'm trying to stop Mysql v5.1 on MacOSX 10.6 so that I can upgrade to Mysql v5.5.
I believe I installed v5.1 from source many months ago. I've attempted all the methods listed here: How do you stop MySQL on a Mac OS install?.
However when I do a "mysqladmin shutdown" it seems the os just spawns another mysql process:
$ sudo mysqladmin shutdown
$ ps -Af | grep mysql
74 53283 1 0 0:00.01 ?? 0:00.01 /bin/sh /usr/local/mysql/bin/mysqld_safe
74 53324 53283 0 0:00.01 ?? 0:00.03 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --log-error=/usr/local/mysql/var/Al.local.err --pid-file=/usr/local/mysql/var/Al.local.pid
501 53343 52577 0 0:00.00 ttys003 0:00.00 grep mysql
The same thing happens if I try to kill the process. (However if I try to kill the mysqld_safe process I get "No such process")
I've looked in /Library/StartupItems and there's no MySQL directory. I know I didn't use MacPorts to install Mysql.
What am I missing here? How do I slay this beast?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
@Sly——你的修复效果很好。但是,如果您不想重新启动,我发现(在
man launchctl
中)您也可以通过发出以下命令使其停止重新启动 mysql:PS:您的 com.mysql.mysqld.plist 文件可能位于 /Library/LaunchDaemons 或 /Library/LaunchAgents 中或位于 ~/Library/LaunchDaemons 或 ~/Library/LaunchAgents 中
@Sly -- your fix works nicely. However, if you didn't want to restart I found (in
man launchctl
) that you can also make it stop restarting mysql by issuing the following command:PS: Your com.mysql.mysqld.plist file may be in /Library/LaunchDaemons or /Library/LaunchAgents or in ~/Library/LaunchDaemons or ~/Library/LaunchAgents
我有一个类似的安装,没有启动器守护程序。我在终端中运行 mysqld。我发现关闭它的唯一方法是向 mysqld 进程发送信号 11。
I have a similar install without the launcher daemon. I run mysqld in a terminal. I find the only way I can shut it down is by sending signal 11 to the mysqld process.
MySQL是使用launchctl启动的,在launchctrl的帮助下卸载它
尝试卸载应该可以解决问题,
如果mysql没有使用launchctl实用程序加载,那么卸载不会停止mysql,那么在这种情况下,常规的
sudo mysqladmin shutdown将起作用< /代码>
MySQL is started using launchctl take help of launchctrl to unload it
Try unload the should resolve the Issue
if mysql has not loaded using the launchctl utilty then unload will not stop the mysql then in this case the regular
sudo mysqladmin shutdown will work