退出 MySQL 而不在 El Capitan 上重新启动 [英] Quit MySQL without it restarting on El Capitan
问题描述
我正在运行 OS X 10.11 El Capitan 及其内置服务器堆栈(Apache 2.4.16、MySQL 5.6.26).
I'm running OS X 10.11 El Capitan with its built-in server stack (Apache 2.4.16, MySQL 5.6.26).
我需要退出 mysql,但终止进程会立即重新启动它.
I need to quit mysql, but killing the process immediately restarts it.
这是我迄今为止尝试过的:
Here's what I've tried so far:
<代码>$ ps aux |grep mysql 获取PID返回
74 49484 1 0 10:23AM ?? 0:00.46 /usr/local/mysql/bin/mysqld --user=_mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/usr/local/mysql/data/mysqld.local.err --pid-file=/usr/local/mysql/data/mysqld.local.pid --port=3307
然后,$ sudo kill -9 49484
终止进程,但它立即以更高的 PID 重新启动.
Then, $ sudo kill -9 49484
kills the process, but it immediately restarts with with a higher PID.
<代码>$launchctl 列表 |grep mysql 什么都不返回,所以没有什么可$launchctl unload
$ launchctl list | grep mysql
returns nothing, so there is nothing to $ launchctl unload
$/usr/local/mysql/support-files/mysql.server stop
失败并显示错误!找不到 MySQL 服务器 PID 文件!"尽管 mysql 正在运行并且 PID 文件在/usr/local/mysql/data/mysqld.local.pid 中是最新的.
$ /usr/local/mysql/support-files/mysql.server stop
fails with "ERROR! MySQL server PID file could not be found!" despite the fact that mysql is running and the PID file is up-to-date in /usr/local/mysql/data/mysqld.local.pid.
以上都是我在 Stack Overflow 上找到的建议解决方案,但在 El Capitan 上没有一个对我有用.在 Yosemite 上,简单地终止进程就足够了,但是随着 El Capitan 更新,mysql 会立即重新启动.
The above are all suggested solutions I found on Stack Overflow, none of which work for me on El Capitan. On Yosemite, simply killing the process was sufficient but with the El Capitan update, mysql is immediately restarted.
谢谢.
推荐答案
最终对我有用的是通过 Mac 系统偏好设置界面停止 MySQL.这杀死了mysql而没有回来.
What finally worked for me was stopping MySQL through the Mac System Preferences interface. That killed mysql without it coming back.
这篇关于退出 MySQL 而不在 El Capitan 上重新启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!