sql> use mysql;#mysql 5 版本示例 ip/网段参考下面配置
sql> CREATE USER'root'@'ip/网段' IDENTIFIED BY 'password';
sql> grant all privileges on *.* to 'root'@'ip/网段' identified by 'password';#mysql 8 版本示例
sql> CREATE USER'root'@'10.20.6.%' IDENTIFIED WITH mysql_native_password BY 'password';
sql> grant all privileges on *.* to 'root'@'10.20.6.%';#刷新权限
sql> flush privileges;