Mac M1 Homebrew 安装mysql 8.0.27的配置文件局域网访问

想改mac mysql配置,变为局域网可访问

查看本地mysql的config文件

 mysql --verbose --help | grep my.cnf
image.png

找到配置文件在 /opt/homebrew/etc/my.cnf

127.0.0.1 更改为 0.0.0.0

# Default Homebrew MySQL server config
[mysqld]
# Only allow connections from localhost
bind-address = 0.0.0.0
mysqlx-bind-address = 0.0.0.0

你可能感兴趣的:(Mac M1 Homebrew 安装mysql 8.0.27的配置文件局域网访问)