mysql8 允许外网访问

mysql -u root -p
use mysql;
update user set host='%' where user ='root';
FLUSH PRIVILEGES;  #刷新权限
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION;

参考链接

你可能感兴趣的:(sql)