mysql远程访问

1、mysql -u root -p

2、grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;

flush privileges;

3、打开/usr/local/Cellar/mysql/5.7.16/下的homebrew.mxcl.mysql.plist文件,去掉

--bind-address=127.0.0.1

或0.0.0.0

4、brew services stop mysql

brew services start mysql

原文地址:https://www.cnblogs.com/zhaoguangjie/p/7154003.html