Why only grant usage permissions can be deleted and modified

Source: Internet
Author: User
Tags mysql manual
Log in to the remote database on 192.168.0.1 with Dbuser:


Show grants;
Show

GRANT USAGE on * * to ' dbuser ' @ ' 192.168.0.1 ' identified by PASSWORD ' *fe63xxxxxxxxxxxxx1c16a ' only this one,


Dbuser This user only usage permissions, check the next MySQL manual,mysql usage permissions is empty permissions, the default create user permissions, can only connect the library, nothing can dry, but this user can be database table SELECT, INSERT, Update,delete, what's going on?


After the investigation and discovery,


Show grants shows the permissions of this user, but if there are user,db data inconsistencies in these permission tables,
It is not so smart, because there were [email protected]% users, assigned permissions, and later deleted from the user table,
Without the drop user, the user table is not available, but the DB table permission is still there, and another user [email protected] accesses the DB table to view the permissions.
Just mapping to the [email protected]% This user's permission, so you can delete and change the search, but with show grants for user [email protected] will only display and it
The right to exactly match, and does not introduce% This user's permissions, so all operations with the command, can guarantee the consistency of the permission table, otherwise it is easy to find the problem.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Why only grant usage permissions can be deleted and modified

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.