mysql安装:
brew search mysql
brew install mysql@5.7
use mysql;
update user set authentication_string=password('123456') where user='root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
flush privileges;
brew services restart mysql@5.7
配置文件位置:
mysql --help | grep y.cnf
vim /usr/local/etc/my.cnf
/opt/homebrew/etc/my.cnf
[mysqld]
# Only allow connections from localhost
bind-address = 0.0.0.0
max_allowed_packet=104857600
错误日志:
vim /usr/local/var/mysql/liyuchaodeMacBook-Pro.local.err