Mysql_ Smudge Notes-fifth chapter on the permissions system in MySQL database

Source: Internet
Author: User

Fifth. Permission system in MySQL database

MySQL database service is a white list of permissions policy, that is, explicitly specify which users can do what, but not explicitly specify what some users can not do, the authentication of permissions is mainly through the MySQL library of several data dictionary tables, to achieve different granularity of the permission requirements.

1. Permission granting and recycling
In the MySQL database for the grant and release of user rights is more flexible, can be either through a dedicated command, or directly manipulate the dictionary to achieve

Create user
Create user JSS;

Delete User
Drop user "JSS" @ "%";

Set Password
Set password for Jss=password (' 111111 ');

Create a user and set a password
Create user [email protected] ' 127.0.0.1 ' identified by ' 111111 ';

Greant Select on Library name. Table name to ' user ' @ ' IP ' identified by ' passwd ';
Greant all on the library name. Table name to ' user ' @ ' IP ' identified by ' passwd ';

Mysql_ Smudge Notes-fifth chapter on the permissions system in MySQL database

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.