创建用户指定网络
- 为同一用户名赋予多个子网访问权限,要分开创建
- 子网掩码设置为255.255.255.128好像不行,要255.255.255.0(待确认)
CREATE USER 'baidu'@'14.215.188.0/255.255.255.0' IDENTIFIED BY 'xxxx';
CREATE USER 'baidu'@'111.45.0.0/255.255.252.0' IDENTIFIED BY 'xxxx';
GRANT all privileges ON sale.* TO 'baidu'@'111.45.0.0/255.255.252.0' WITH GRANT OPTION;
GRANT all privileges ON sale.* TO 'baidu'@'14.215.188.0/255.255.255.0' WITH GRANT OPTION;
flush privileges;