参考https://gist.github.com/operatino/392614486ce4421063b9dece4dfe6c21
Install brew services first : $ brew tap homebrew/services
Load and start the MySQL service : $ brew services start mysql@5.7
Expected output : Successfully started mysql (label: homebrew.mxcl.mysql)
Check of the MySQL service has been loaded : $ brew services list
Force link 5.7 version - $ brew link mysql@5.7 --force
Verify the installed MySQL instance : $ mysql -V
安装完成后mysql配置读取顺序默认为:/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
找到相应的文件,修改配置,然后brew services restart mysql@5.7
没有评论:
发表评论