Mysql permission and security, mysql permission security

Source: Internet
Author: User

Mysql permission and security, mysql permission security

1. the MySQL permission system performs authentication in two phases:

(A) authenticate the user, and combine the IP address and user name,

(B) grant corresponding permissions to legal users. The permission table is loaded into the memory when the database is started.

2. the user, host, and db permission tables in the mysql database are used during permission access. Two-phase verification process

(A) The host, user, and password in the user table determine whether A connection is allowed.

(B) Permission table sequence: user-> db-> tables_priv-> columns_priv.

Each permission in the user table represents the permissions available to all databases, and each permission in the db table represents the permissions available to specific databases.

Iii. Account Management

Two ways to create an account: Use the GRANT syntax to create or directly operate the authorization table. The first method is recommended.

You can use the GRANT and REVOKE commands to modify permissions.

Iv. Security Issues

(A) Strictly control operating system accounts and permissions

(B) Avoid running MySQL with root permissions as much as possible

(C) Prevent DNS Spoofing

(D) Delete an anonymous account

(E) Set a password for the root account

(F) Set a Security Password

(G) only grant the account the required permissions

(H) only allow the root user to have access to the mysql database user table

(I) Only grant the Administrator the FILE, PROCESS, and SUPER permissions.

(J) drop table does not revoke the previous access authorization.

(K) use SSL

(L) add IP address restrictions to all users

(M) Pay attention to the REVOKE command Vulnerability

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.