MySQL addendum 3

Source: Internet
Author: User
Summary of Permissions

1. Create an account
Grant all privileges on *. * To Z1 @ localhost;
*. * Indicates that you have permissions on all the local databases and tables. You can change the permission to on test. user, and you have permissions on the user table of the test database.
Restrict IP addresses and add passwords
Grant select, insert, update... on test1. * To 'z1' @ 'localhost' identified by 'Password'
You can also use on test. * To 'z1' @ '%' to indicate that you can connect to any host.

2. Grant login permissions to a user, but nothing else can be seen.
Grant usage on *. * To 'z4' @ 'localhost ';
3. view the permissions of a user
Show grants from Z1 @ localhost;
View the permissions of the Z1 user.
4. revoke permissions
Revoke select, insert on *. * From Z2 @ localhost;

5 Security Principles
A. Do not log on with the root account.
B. Except root, no user should have permissions for the MySQL database and user table database.
C. do not grant file, process, or super permissions to accounts other than administrators.

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.