MENU

macosにmysql5.7をhomebrewでインストールする手順

$ brew update
$ brew install mysql@5.7
# インストール成功
$ mysql --version
mysql  Ver 14.14 Distrib 5.7.38, for osx10.16 (x86_64) using  EditLine wrapper
# my.confを編集
$ find /usr/local/Cellar/mysql@5.7/5.7.38/ -name "my*.cnf"
/usr/local/Cellar/mysql@5.7/5.7.38//.bottle/etc/my.cnf
$ vi /usr/local/Cellar/mysql@5.7/5.7.38//.bottle/etc/my.cnf
# 以下を追記
character-set-server=utf8
default_authentication_plugin=mysql_native_password
# 起動
$ mysql.server start
Starting MySQL
 SUCCESS! 

参考:https://blog.proglus.jp/35/