背景
MySQL の起動や停止に手間取ったので、コマンドをメモしておく。
コマンド
bash
$ launchctl list | grep mysql
13659 0 homebrew.mxcl.mysql@5.7
macにはlaunchctlという仕組みがあり、plist定義を作っておくと、自動でデーモンを起動してくれる。
これにmysqlが定義されているか、確認する。
参考↓
bash
$ brew services stop mysql@5.7
Stopping `mysql@5.7`... (might take a while)
==> Successfully stopped `mysql@5.7` (label: homebrew.mxcl.mysql@5.7)
launchctl の管理から、mysql を除外する。
bash
$ mysql.server status
ERROR! MySQL is not running
bash
$ ps aux | grep mysql
glaciermelt 43395 0.0 0.0 4277624 724 s004 S+ 2:14PM 0:00.00 grep --color=auto mysql
mysql が起動しているか、確認する。
↧