In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following mainly brings you how to obtain mysql user rights in batches. I hope these words can bring you practical use, which is also the main purpose of how I edit mysql user rights to obtain this article in batches. All right, don't talk too much nonsense, let's just read the following.
-- permissions at the CVM level
Select a.GRANTEEEE GROUPPRONCONcat (a.PRIVILEGE_TYPE), concat ("grant", GROUP_CONCAT (a.PRIVILEGE_TYPE), "ON *. * to", a.GRANTEE) from USER_PRIVILEGES a GROUP BY GRANTEE
-- permissions at db level
Select GRANTEE,TABLE_SCHEMA,GROUP_CONCAT (PRIVILEGE_TYPE), concat ("grant", GROUP_CONCAT (PRIVILEGE_TYPE), "ON", TABLE_SCHEMA, ". * to", GRANTEE) from information_schema.SCHEMA_PRIVILEGESGROUP BY GRANTEE,TABLE_SCHEMA
-- Table-level permissions
Select GRANTEE,TABLE_SCHEMA,table_name,GROUP_CONCAT (PRIVILEGE_TYPE), concat ("grant", GROUP_CONCAT (PRIVILEGE_TYPE), "ON", TABLE_SCHEMA, ".", table_name, "to", GRANTEE) from information_schema.TABLE_PRIVILEGESGROUP BY GRANTEE,TABLE_SCHEMA,table_name
-column level permissions
Select GRANTEE,TABLE_SCHEMA,table_name,COLUMN_NAME,GROUP_CONCAT (PRIVILEGE_TYPE) from information_schema.COLUMN_PRIVILEGESGROUP BY GRANTEE,TABLE_SCHEMA,table_name,COLUMN_NAME
-- obtain user permissions and passwords (ciphertext)
Select a.GRANTEEEE GROUPPERCONcat (a.PRIVILEGE_TYPE), concat ("grant", GROUP_CONCAT (a.PRIVILEGE_TYPE), "ON *. * to", a.GRANTEE, "identified by password'", c.authentication_string, "';") privifrom USER_PRIVILEGES a left join mysql.user con a.GRANTEE = concat ("'", c.user, "'", "@", "", c.host, "'") GROUP BY GRANTEE
For the above about how to obtain mysql user rights in batches, do you think it is very helpful? If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
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.