MySQL grants small kee _mysql

Source: Internet
Author: User
When the Mycheckpoint is installed, this secret is discovered when the user is given permission to do so:
Copy Code code as follows:

Mysql>
Mysql> GRANT all privileges in mycheckpoint.* to ' mycheckpoint_user ' @ ' localhost ' identified by ' 123456 ';
ERROR 1470 (HY000): String ' Mycheckpoint_user ' is too long for user name (should to no longer than 16)
Mysql>

Grant command is a MySQL database for user creation, permissions or other parameters to control the powerful command, the official network introduced it there are several big pages, to use fine it is not a day and a half early things, expediency based on the experience slowly grasp it!
A brief description of the grant command is as follows:
The GRANT statement enables system administrators to GRANT privileges to MySQL user accounts. GRANT also serves to specify, characteristics such as use, secure connections and limits on access to serve R Resources. To use GRANT, your must have the grant OPTION privilege, and you must have privileges the are.
This passage means that the grant command allows the system administrator to grant various privileges to the MySQL user account (grant privileges), and grant can of course be used to set other features of the account such as secure connection and service data access restrictions, To use the grant command, you must have grant OPTION permission, and you must have the permission you want to grant!
Show grants with show Grant command [for user]
The explanation for this command is: This statement lists the GRANT statement or statements that must is issued to duplicate the privileges that are GR anted to a MySQL user account.
If you want the current user's permissions, you can use one of these three commands:

Show grants; Show grants for Current_User; Show grants for Current_User (), the effect of running a command on this computer (when connecting to MySQL with the root user used) requires the following information: The type of grant, that is, what permissions you want to grant (privilege Type), is the Allow query? Insert row? Create? Or the other, and so on. Grant's object type (priv_type) has three kinds: TABLE, FUNCTION, PROCEDURE, and one of the default, database databases. Grant's Object (Priv_level): Is it acting on all databases? Or is it acting on a database, all the tables that work on the database, or a single table, or even some columns in the table! This can be done to imagine that the user is a Chengguan law enforcement: He has those privileges (privilege type), driving away ghosts? Confiscate the ghost thing? He manages that kind of (priv_type) walking ghost? A fruit salesman? Baked or sold plutonium? What is the scope of his administration: the whole district? A street? Finally, different permissions can or cannot be applied to different object types and ranges, the following is a partial screenshot, specific may refer to:
Dev.mysql.com/doc/refman/5.1/en/privileges-provided.html


The following is a number screenshot of certain permissions, detailed in dev.mysql.com/doc/refman/5.1/en/grant.html
Related Article

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.