LoginSignup
3
3

More than 5 years have passed since last update.

Homebrewでインストールしたmysqlのbind-addressを変更して外部のホストからアクセスできるようにする

Posted at

ハマったのでメモ

Homebrewでmysqlをインストールするとデフォルトではbind-address=127.0.0.1で起動しています。
ps auxww|grep [m]ysqldで起動中のmysqlのプロセスをオプション付きで確認できます(--bind-address=127.0.0.1となっている)。

この設定は/usr/local/Cellar/mysql/5.7.16/homebrew.mxcl.mysql.plistに記述されています!
/etc/my.cnfを変更しても変わりませんでした!!

<string>--bind-address=127.0.0.1</string>

<string>--bind-address=0.0.0.0</string>

に修正してサービスを再起動!

brew services restart mysql

これで--bind-address=0.0.0.0で起動します。

最後まで読んでいただいてありがとうございました。

参考: http://dba.stackexchange.com/questions/55958/cant-remote-access-mysql-server-running-on-mac-os-x

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3