In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces Mysql 5.7.18 how to use MySQL proxies_priv to achieve similar user group management, has a certain reference value, friends in need can refer to. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
Using MySQL proxies_priv (simulated role) to realize similar user group management
Roles (Role) can be used to manage users in batches. Users under the same role have the same permissions.
MySQL5.7.X can later simulate the function of Role, which can be realized by mysql.proxies_priv simulation.
1. Configure proxy
Mysql > show variables like "% proxy%"; # check whether the current proxy is enabled. The following figure shows that it is not enabled.
Mysql > set global check_proxy_users = on; # enable proxy the following figure indicates that mysql > set global mysql_native_password_proxy_users = on is enabled
The above parameters set in mysql > exitBye # are not valid for the current session. You need to log in again after exiting, or set them directly to my.cnf.
2. Create a user
Mysql > create user will_dba; # similar group mysql > create user 'will';mysql > create user' tom'; # password is not set. If you need to set the password, add identified by '123' after it.
3. Map the permissions of will_dba (map) to will,tom
Mysql > grant proxy on will_dba to will;mysql > grant proxy on will_dba to tom
4. Give actual permissions to will_dba (simulated Role)
Mysql > grant select on *. * to will_dba
5. View the permissions of will_dba
Mysql > show grants for will_dba
6. View the permissions of will and tom
Mysql > show grants for will
Mysql > show grants for tom
7. View the permissions of proxies_priv
Mysql > mysql > select * from mysql.proxies_priv
8. Verification
Use will and tom users to view the database
[root@test-1 ~] # mysql-utom-pmysql > show databases; # tom user we didn't grant permission before, but you can see mysql > show tables;mysql > select * from user\ G here.
Mysql.proxies_priv is only a simulation of Role, and the role of Oracle is still different. Officially known as Role like.
Thank you for reading this article carefully, I hope the editor can share Mysql 5.7.18 how to use MySQL proxies_priv to achieve similar user group management content is helpful to everyone, but also hope that you support a lot, pay attention to the industry information channel, find problems, detailed solutions waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.