mysql--Permissions Issues

Source: Internet
Author: User

#创建用户
Create user ' lin ' @ ' localhost ' identified by ' 123 ';

#insert, Delele,update,select
#级别1: For all libraries, under all tables, under all fields
Grant SELECT On *. lin1 ' @ ' localhost ' identified by ' 123 ';

#级别2: All the fields under the DB1 library, under all tables,
Grant SELECT on db1.*-' lin2 ' @ ' localhost ' identified by ' 123 ';

#级别3: All fields below the table db1.t1
Grant SELECT on Db1.t1-' lin3 ' @ ' localhost ' identified by ' 123 ';

#级别4: Id,name field under Table Db1.t1
Grant Select (id,name) on db1.t1 to ' lin4 ' @ ' localhost ' identified by ' 123 ';
Grant Select (id,name), update (name) on db1.t1 to ' lin5 ' @ ' localhost ' identified by ' 123 ';

#修改完权限后, remember to refresh the permissions
Flush privileges;


LocalHost local host, identified by: Differential
Grant grants, Allow. Select Selection
Create user ' Panyu ' @ ' localhost ' identified by ' 123 '
Create user

Grant SELECT On * * to ' pan ' @ ' localhost ' identified by ' 123 '
Grant pan View permissions for all libraries and all fields
Grant SELECT on db1.* to ' yu ' @ ' localhost ' identified by ' 123 ';
Grant Yu to view all permissions for all tables under this library
Grant SELECT on Db1.t1 to ' Zhuge ' @ ' loaclhost ' identified by ' 123 ';
Grant Zhuge to view the fields in the DB1 library, below the T1 table.
Grant Select (id,name) on db1.t1 to ' guanyu ' @ ' localhost ' identified by ' 123 ';
Grang Select (id,name) update (name) on db1.t1 to ' Zhangfei ' @identified by ' 123 ';

mysql--Permissions Issues

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.