17 สิงหาคม 2560

MySQL user with ip range

For a host value specified as an IPv4 address, a netmask can be given to indicate how many address bits to use for the network number. Netmask notation cannot be used for IPv6 addresses.
The syntax is host_ip/netmask. For example:

CREATE USER 'david'@'192.58.197.0/255.255.255.0';

https://dev.mysql.com/doc/refman/5.6/en/account-names.html