网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

MySQL5.7的角色功能

MySQL 5.7的角色功能:

创新互联主要从事成都网站建设、网站建设、网页设计、企业做网站、公司建网站等业务。立足成都服务东乌珠穆沁,十年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:18980820575

创建用户并授予用户角色功能:

mysql> create user 'junior'@'127.0.0.1' identified by '123';

Query OK, 0 rows affected (0.01 sec)

mysql> create user 'tom'@'127.0.0.1' identified by '123';

Query OK, 0 rows affected (0.00 sec)

mysql> create user 'jim'@'127.0.0.1' identified by '123';

Query OK, 0 rows affected (0.01 sec)

mysql> grant proxy on 'junior'@'127.0.0.1' to 'tom'@'127.0.0.1';

Query OK, 0 rows affected (0.01 sec)

mysql> grant proxy on 'junior'@'127.0.0.1' to 'jim'@'127.0.0.1';

Query OK, 0 rows affected (0.00 sec)

mysql> grant select on *.* to 'junior'@'127.0.0.1';

Query OK, 0 rows affected (0.00 sec)

mysql> show grants for 'junior'@'127.0.0.1';

+---------------------------------------------+

| Grants for junior@127.0.0.1                 |

+---------------------------------------------+

| GRANT SELECT ON *.* TO 'junior'@'127.0.0.1' |

+---------------------------------------------+

1 row in set (0.00 sec)

mysql> show grants for 'jim'@'127.0.0.1';

+----------------------------------------------------------+

| Grants for jim@127.0.0.1                                 |

+----------------------------------------------------------+

| GRANT USAGE ON *.* TO 'jim'@'127.0.0.1'                  |

| GRANT PROXY ON 'junior'@'127.0.0.1' TO 'jim'@'127.0.0.1' |

+----------------------------------------------------------+

2 rows in set (0.00 sec)

mysql> show grants for 'tom'@'127.0.0.1';

+----------------------------------------------------------+

| Grants for tom@127.0.0.1                                 |

+----------------------------------------------------------+

| GRANT USAGE ON *.* TO 'tom'@'127.0.0.1'                  |

| GRANT PROXY ON 'junior'@'127.0.0.1' TO 'tom'@'127.0.0.1' |

+----------------------------------------------------------+

2 rows in set (0.00 sec)

mysql> use mysql;

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

mysql> select * from proxies_priv;

+-----------+------+--------------+--------------+------------+----------------------+---------------------+

| Host      | User | Proxied_host | Proxied_user | With_grant | Grantor              | Timestamp           |

+-----------+------+--------------+--------------+------------+----------------------+---------------------+

| localhost | root |              |              |          1 | boot@connecting host | 0000-00-00 00:00:00 |

| 127.0.0.1 | tom  | 127.0.0.1    | junior       |          0 | root@localhost       | 0000-00-00 00:00:00 |

| 127.0.0.1 | jim  | 127.0.0.1    | junior       |          0 | root@localhost       | 0000-00-00 00:00:00 |

+-----------+------+--------------+--------------+------------+----------------------+---------------------+

3 rows in set (0.00 sec)


本文名称:MySQL5.7的角色功能
文章来源:http://bjjierui.cn/article/pdchsp.html

其他资讯