Mac OS 下 Mysql 配置备忘

安装:brew install mysql

为 MySQL 设置密码:mysql_secure_installation

启动:mysql.server start

关闭:mysql.server stop

所有参数:start|stop|restart|reload|force-reload|status

开机自动启动:brew services start mysql

列出所有 brew 开机启动项目:brew services list

清除所有不用的服务:brew services cleanup

参考资料:

Starting and Stopping Background Services with Homebrew
在MAC下安装MYSQL并设置为开机启动