In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Role functions of MySQL 5.7:
Create a user and grant the user role function:
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-0000: 00:00 |
| | 127.0.0.1 | tom | 127.0.0.1 | junior | 0 | root@localhost | 0000-0000: 00:00 |
| | 127.0.0.1 | jim | 127.0.0.1 | junior | 0 | root@localhost | 0000-0000: 00:00 |
+-+
3 rows in set (0.00 sec)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.