56,679
社区成员
发帖
与我相关
我的任务
分享
mysql> select host,user,insert_priv,select_priv from db where db='test';
+-----------+-------+-------------+-------------+
| host | user | insert_priv | select_priv |
+-----------+-------+-------------+-------------+
| % | model | Y | Y |
| 10.10.1.5 | model | Y | Y |
+-----------+-------+-------------+-------------+
2 rows in set (0.00 sec)
mysql> grant all privileges on test.* to model@'10.10.1.5' identified by 'model';
Query OK, 0 rows affected (0.02 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> select user,host from user;
+-------+-----------+
| user | host |
+-------+-----------+
| model | % |
| scot | % |
| model | 10.10.1.5 |
| root | localhost |
+-------+-----------+
4 rows in set (0.00 sec)
mysql> select user,host from user;
+-------+-----------+
| user | host |
+-------+-----------+
| model | % |
| scot | % |
| root | localhost |
+-------+-----------+
3 rows in set (0.02 sec)