用户访问限制
mysql> create user 'root'@'172.13.13.241' identified by '1111';
Query OK, 0 rows affected (0.00 sec)
mysql> create user 'root'@'172.18.%.%' identified by '1111';
mysql> create user 'root'@'192.168.2.155' identified by '1111';
mysql> create user 'root'@'172.13.13.243' identified by '1111';
Query OK, 0 rows affected (0.00 sec)
mysql> create user 'root'@'172.13.13.242' identified by '1111';
mysql> grant all on `db2`.* to root@'172.20.118.242' identified by '1111';
GRANT ALL PRIVILEGES ON `db2`.* TO 'root'@'172.13.13.241','root'@'172.18.%.%','root'@'192.168.2.155','root'@'172.13.13.243','root'@'172.13.13.242';