Cancel MySQL user permissions

Source: Internet
Author: User
Tags mysql index

To ensure database security, you need to restrict MySQL user permissions. The following describes how to cancel MySQL user permissions and hope to help you learn MySQL user permissions.

In fact, the with grant option clause allows another user to be granted access rights. You must know that two users with the GRANT permission can GRANT their own permissions to each other. If only one user is granted the SELECT permission and another user is granted the GRANT and other permissions in addition to the SELECT permission, the second user can make the first user "powerful.

Cancel MySQL user permissions and delete users

To REVOKE the MySQL user permissions of a user, you can use the REVOKE statement. Except for replacing to with from without the IDENTIFIEDBY or with grant option clause, the REVOKE syntax is very similar TO that of the GRANT statement:

REVOKE privileges (columns) ON what FROM user

The user part must match the user part of the original GRANT statement of the user whose permissions are to be revoked. Priv I l e g e s does not need to be matched. You can use the GRANT statement to GRANT permissions, and then use the REVOKE statement to cancel some of them. The REVOKE statement only deletes permissions and does not delete users. The user's items are still in the user table, even if you cancel all permissions of the user. This means that the user can still connect to the server. To DELETE the entire user, you must use the DELETE statement to directly DELETE the user's records from the user table:

The DELETE statement deletes the user's items. The FLUSH statement tells the server to reload the authorization table. When the GRANT or REVOKE statement is used instead of directly modifying the authorization table, these tables are automatically reloaded ).

Eight things to pay attention to in MySql Indexes

Use of MySQL EXPLAIN statements

Take you to understand the mysql index type

Implement ADO connection to MYSQL

Example of a java mysql Stored Procedure

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.