首先安装homebrew
使用 brew search mysql 进行搜索你想要的版本

使用brew install mysql@5.6 进行安装指定版本的mysql
安装结束会有几种消息进行显示
相关的依赖dependencies 选项options 还有一些附加说明caveats
根据附加说明我们要进行环境变量的指定
echo 'export PATH="/usr/local/opt/mysql@5.6/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile进行更新使立即生效
brew services list可以查看整个brew管理的服务列表
使用brew services start mysql@5.6进行启动

随后我们就可以进入mysql的窗口进行查询和配置
select * from information_schema.user_privileges;

到此结束更多设置可以在my.conf中进行设置初始化参数
网友评论