What permissions are included in all privileges in MySQL

Source: Internet
Author: User

Mysql> grant all privileges on test.* to ' ybb ' @ ' percent ' identified by ' YBB '; Query OK, 0 rows affected (0.07 sec) mysql> flush privileges; Query OK, 0 rows Affected (0.00 sec) mysql> Select Host,user,password from Mysql.user where user= ' ybb ' and host= '% '; +--- --------+---------+-------------------------------------------+| Host | user | Password |+-----------+---------+-------------------------------------------+| %         | Ybb | *c85ee1eaa8e69c43ce790c4cffcf1ed2f88039eb |+-----------+---------+-------------------------------------------+1 Rows in Set (0.00 sec) mysql> Show grants for ybb;+----------------------------------------------------------------- ----------------------------------+| Grants for [email protected]% |+--- ------------------------------------------------------------------------------------------------+| GRANT USAGE on * * to ' ybb ' @ '% ' Identified by PASSWORD ' *c85ee1eaa8e69c43ce790c4cffcf1ed2f88039eb ' | | GRANT all privileges the ' test '. * to ' ybb ' @ '% ' |+--------------------- ------------------------------------------------------------------------------+2 rows in Set (0.00 sec) mysql> Revoke insert on test.* from [email protected] '% '; Query OK, 0 rows Affected (0.00 sec) mysql> Show grants for ybb;+----------------------------------------------------- --------------------------------------------------------------------------------------------------------------- ------------------------------------------------+|                                                                                                                                                                                                    Grants for [email protected]% |+------------ --------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------+|                                                                                                                  GRANT USAGE on * * to ' ybb ' @ '% ' identified by PASSWORD ' *c85ee1eaa8e69c43ce790c4cffcf1ed2f88039eb ' || GRANT SELECT, UPDATE, DELETE, create, DROP, REFERENCES, INDEX, ALTER, CREATE temporary TABLES, LOCK TABLES, EXECUTE, creat E view, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER on ' test '. * to ' ybb ' @ '% ' |+------------------------------ --------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------+2 rows in Set (0.00 sec) mysql>

  

From the above you can see that all privileges contains the following permissions:

Select, insert, UPDATE, delete, create, drop, references, index, ALTER, create temporary tables, lock tables, execute, CRE Ate view, show view, create routine, alter routine, event, trigger

  

What permissions are included in all privileges in MySQL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.