无法在 Mac OSX 10.6 上停止 Mysql 5.1

发布于 2024-11-24 06:37:24 字数 920 浏览 1 评论 0原文

我试图在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

娇妻 2024-12-01 06:37:24

@Sly——你的修复效果很好。但是,如果您不想重新启动,我发现(在 man launchctl 中)您也可以通过发出以下命令使其停止重新启动 mysql:

sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist

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:

sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist

PS: Your com.mysql.mysqld.plist file may be in /Library/LaunchDaemons or /Library/LaunchAgents or in ~/Library/LaunchDaemons or ~/Library/LaunchAgents

夜光 2024-12-01 06:37:24

我有一个类似的安装,没有启动器守护程序。我在终端中运行 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.

坐在坟头思考人生 2024-12-01 06:37:24

MySQL是使用launchctl启动的,在launchctrl的帮助下卸载它

  launchctl interfaces with launchd to load, unload daemons/agents and generally control launchd

尝试卸载应该可以解决问题,

sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist

如果mysql没有使用launchctl实用程序加载,那么卸载不会停止mysql,那么在这种情况下,常规的sudo mysqladmin shutdown将起作用< /代码>

MySQL is started using launchctl take help of launchctrl to unload it

  launchctl interfaces with launchd to load, unload daemons/agents and generally control launchd

Try unload the should resolve the Issue

sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文